Questions tagged as 'linq'

0
answers

Prevent query error

I have this query in Linq: var results = (from u in db.datos where u.IdLogin == id select u).ToList(); The problem arises when the user has not filled out their data and marks me an error since it...
asked by 13.02.2018 / 17:14
0
answers

Tour table looking for a specific field LINQ Lambda

How to transform a Query to Linq that runs through all the tables in the Database and search in each one of them for a specific field and if it succeeds, look for a record? I have the normal Query procedure but I am programming a complete sys...
asked by 10.02.2018 / 02:07
1
answer

Filter a list by a property that is a list with items from another list with Linq

I have a list of objects (Invoices) that have a property that in turn is also a list (DetailFactura) of objects of LineaFactura type. On the other hand I have a list of strings that represent the items by which to filter. It would be something l...
asked by 24.10.2017 / 10:38
1
answer

Get data from an array with LINQ

If arrRep is an array I can perform the following query with linq are the arrRep array, I want the references that meet the condition of the query: arrRep = oRep.buscarTodosImpo(dFecIni, dFecFin, nDato); var q = (from f in arrRep w...
asked by 10.10.2017 / 18:28
1
answer

show table data related to LINQ

Dear friends, good evening. I have a method to fill clients by name in a datagridview this is my code: public List<CLIENTES> GetClientesByNombre(string nombre) { using (RSAEntities db = new RSAEntities()) {...
asked by 14.09.2017 / 05:15
0
answers

What is the Visual Basic Group Join for?

WLista = (From T In obj Group Join P In .PassWord On P.Numero Equals T.PassWord Into Pw = Group From P1 In Pw.DefaultIfEmpty Group Join A In .Atributo On A.Empresa Equals T.Atrib...
asked by 07.09.2017 / 15:43
1
answer

How can I make a select with Linq to take out rows

HERE I SHOW MY LINQ CODE //select para mostrar nombres en ver,delete public ComprarBloqueosBusqueda BuscaPorNombre(int? id ) { ComprarBloqueosBusqueda vCOMBLO_Comprar = new ComprarBloqueosBusqueda(); var q...
asked by 25.08.2017 / 20:09
0
answers

I need to execute a SQL query in LINQ to return a list of a Complex Type

I have a Complex type called GraficaLD that has two properties, an int property called Data and another string property called Label, which I try to do is return a list "List" by executing a query with LINQ This is my SQL query: select su...
asked by 23.08.2017 / 17:02
1
answer

Query linq to get the rows with the oldest date in a data set

ID (self-generated number) IDFK (self-generated number) but can be repeated DATE (TO DATE) ... ID IDFK FECHA 1 1 1/1/1999 2 1 1/2/1999 3 2 1/3/1999 4 3 1/2/1999 5 4 1/5/1999 6 4 1/3/1999 7 1 1/4/1999 Ok, think that the highest ID do...
asked by 29.05.2017 / 18:32
2
answers

Linq to a Class with ListClass

I have a question, I am a bit new to this Linq, and I need your help. public class getHistorialInstalaciones { public string end_date { get; set; } public udataHistorialInteracciones udata { get; set; } public fromH...
asked by 07.04.2017 / 13:36