Questions tagged as 'linq'

1
answer

How can I convert this query from SQL to LINQ

SELECT STUFF(( SELECT ','+EXC_Nombre FROM Bloqueos as B, Excursiones as E Where B.BloqueosId = 3 and E.ExcursionesId IN ( SELECT [BLE_ExcursionId] FROM [BloqueoExcursions] Where BLE_BloqueoID = 3) FOR XML PATH('')...
asked by 21.09.2017 / 00:44
1
answer

byte attribute [] entity contains Linq string

Good friends, I am new to Entity and Linq and I have a problem that I can not solve. In a query I have to check if a byte [] attribute contains a string that they pass to me. I have tried a thousand ways and it does not work, and finally u...
asked by 09.11.2017 / 18:47
1
answer

Add values of a column of a datatable using linq

With the following table: | Animales | cantidad | ----------------------- | Perros | 5 | | Gatos | 3 | | Loros | 2 | I create the datatable: Dim tabla As New DataTable() tabla.Columns.AddRange(New D...
asked by 01.04.2017 / 20:11
2
answers

Concatenate several records in a chain to show it in only one? LINQ

I have a table called Technologys and each Technology can have one or more resolutions. What I want to do is show all the resolutions that a technology has in the same field. Example Tabla de tecnologias Nombre Descripcion Resoluciones...
asked by 14.07.2016 / 21:49
1
answer

How to use an if loop with a result of system.data.row

I have a web service that has a logical data set. When I use LINQ to be able to obtain a parameter that I want, I do it without problems. Where I find problems is when I call a second web service and I have to make a condition IF to on...
asked by 10.03.2016 / 19:49
1
answer

Error of the underlying provider in Open

I have an error that says: Error of the underlying provider in Open, and in in innerexcepcion says:    {"Timeout value expired." The timeout period   It ran out during the pre-session start phase. It is possible that the   connection will tim...
asked by 07.02.2016 / 04:02
1
answer

DataGridView placing the pointer in row created

At the moment of creating a row in a DataGridView I want the pointer to be in the new row created in the cell of the second column as I show in the imgagen. Every time you create a new row, the cursor should be displayed in this way, ready...
asked by 01.05.2016 / 18:07
0
answers

Convert query select CROSS APPLY to LINQ

I have a selection query SELECT that implements CROSS APPLY and I need to pass it to LINQ Transact SQL Server SELECT distinct(PC.ProductoCatalogoId), P.Nombre + ' ' + PL.Product + ' ' + E.Nombre + ' ' + O.NombreOpcion AS Des...
asked by 09.10.2018 / 04:15
1
answer

Error generating linq data list

Launches the following error:    The entity or complex type 'SisVentaOnlinne.Models.Card' can not be constructed in LINQ to Entities query. This is the method that the list with the data generates: public List<Card> GetCard()...
asked by 24.04.2018 / 14:08
0
answers

Convert SQL to LINQ or LAMBDA [closed]

I would not know how to convert this select into linq or lambda. Mainly the group by and subqueries. select CONVERT(date, tt.FechaHora) ,(select MAX(p.FechaHora) from Transaccion p where CONVERT(date, tT.FechaHora)= CONVERT(date, p.FechaHor...
asked by 04.09.2018 / 15:04