Questions tagged as 'linq'

2
answers

Validate the username and password using LINQ

Goodnight I would like you to help me I am making a query with Linq of the programming language c # since I am doing a validation for a user login my code is this: public class D_Usuario { private DataModel.DataModelDataContext...
asked by 22.04.2017 / 04:06
1
answer

Linq C # Outer Join Show the values that are not in the fields to compare

I have the following doubt, I hope you can help me. I have two tables, one of subjects and another that assigns the subjects to the students through their id. "Not all subjects have students assigned." They ask me to show with linq those subject...
asked by 17.02.2018 / 21:22
2
answers

analyze xml with linq

I need to please, see if someone can light me up a bit, since I have an xml with information about alerts of a medication that is obtained from a REST service published on a server. the answer comes in xml format, and I'm trying to read it with...
asked by 05.09.2017 / 14:32
2
answers

How to subtract dates in a linq query

I need the subtraction now - a.DateLowStock to be> = 14 days. How can I do it? ICollection<Product> products = new List<Product>(); DateTime now = DateTime.Now(); using (ApplicationDbContext db = new Applic...
asked by 07.11.2018 / 18:38
1
answer

Save UserID of a user logged in a specific colmna of the Data Base

I need to save the ID of the user who has logged in the column named "CreatedBy", but I can not write the correct query. Each time a "FitnessGoal" entity is created , the identity data plus the User ID will be saved in the DB: [HttpPost]...
asked by 17.08.2018 / 20:13
1
answer

How to make a LIKE in Linq?

I will reformulate the question better: How can I do a like in linq?     
asked by 22.09.2017 / 21:31
1
answer

Compare items from the same list

I am working with Visual Studio 2015, WPF app. I need to compare elements of the same list. The scenario is the following I am obtaining positions of the hands with the Kinect device which does it in three dimensions X = valor , Y =...
asked by 07.11.2017 / 19:39
1
answer

C # Increase by 1 the value of a Dictionaryint, int with LINQ

I have the following dictionary Dictionary<int, int> datos Which contains the following key-values: [0, 2015] [1, 2016] [2, 2017] My goal is to increase the value by 1 ( with LINQ ) so that it stays like this: [0, 2016] [1, 201...
asked by 20.07.2017 / 09:38
2
answers

How can I use the value of a variable with LINQ?

I'm trying to assign a variable to a select using LINQ. My function which makes it evaluate a data set to get the SourceID according to the caption that has been passed into the select. What I try to do is from an application in Windows Fo...
asked by 08.04.2016 / 14:32
4
answers

Listchar.toString does not convert correctly

I have a list of char , which I want to save in a string with the ToString method. The problem is that it saves me anything: For more information, the method, what it does is to receive the string changed from a T...
asked by 01.01.2018 / 14:46