Questions tagged as 'linq'

3
answers

Remove relationships in select LINQ

My question is the next one, when executing this sentence in LINQ, it brings me the user that I require, but also all the table relations where it has been referenced by a foreign key in the DB, that is, if this user made 1000 sales are going to...
asked by 19.03.2018 / 15:19
2
answers

Left join using Linq C #

I have the person table in which there are 100 people of which 80 are students, of those 80 only 50 are enrolled, I try to make a left join (Sql Server) to show me the student that exists, even if not are enrolled The table that stor...
asked by 30.12.2018 / 19:18
2
answers

Do not fill my datagriview with linq

As a result of my first consultation in this forum, I was suggested to use EF, I am actually learning and it saves me a lot of time in terms of entities, but now I have this problem. I have 4 Data Layers, Entity, Business and Presentation....
asked by 12.09.2017 / 07:10
3
answers

How to convert query from sql to linq?

I need to convert the following query to linq select * from detalle_pedido where articuloid = 13555 and id_pedido=13 I've tried it in the following way var querydetalle = _db.detalle_pedido.Where(dt => dt.articuloid == articu.articuloi...
asked by 30.10.2018 / 16:36
1
answer

Concatenate value in repeated records using linq

I have a query in linq that returns a list of colonies from a table in SQLSERVER. var todasColonias = ( from SQLColonias in context.colonias where SQLColonias.status.Equals(true) select new...
asked by 01.10.2018 / 20:26
1
answer

LINQ Join a query in a single row

I have a LINQ query to which I concatenate the values of a table in a single field to show in DataGridView Dim Consulta = (From ConsultaConceptos In ds.Tables("Concepto") Select New With { _...
asked by 28.03.2016 / 23:45
2
answers

Problem with where in LinqToExcel

I'm using LinqToExcel to read the data in a book, and it works fine, now what I'm trying to do is put a clause where, to get cleaner data. I have this var resultado = (from row in book.Worksheet(NombreSheet)...
asked by 29.04.2016 / 00:00
3
answers

get data with linq for a C # chart?

I send it as Data type List to a chart but the data is not displayed, check the method that makes the query and if you return the values, but chart does not load them public void loadDataLinq() { this.chart1.Palette = ChartColorP...
asked by 23.01.2018 / 15:50
2
answers

How can I put together a predicate function when I have to choose between several options

I have a class public class TestClass { public int? a { get; set; } public int? b { get; set; } public TestClass(int _a, int _b) { a = _a; b = _b; } } And for this class, I generate a list with elements...
asked by 19.07.2018 / 19:02
2
answers

Error removing tuples from a table plus an intermediate

I have 3 tables, NOTICIA , NOTICIA_FOTO (middle table) and FOTO , and I need to delete rows from table FOTO ; and since said table is associated with the intermediate table NOTICIA_FOTO , also delete rows from that...
asked by 21.01.2016 / 14:59