Questions tagged as 'linq'

1
answer

Count method of file type BYTE

It turns out that I have a problem. I can not do the Count method in a Linq query. It's about counting a data defined as BYTE in the database and I can not show it in the view, it returns 0 , null or all values, but...
asked by 09.10.2018 / 16:16
0
answers

Query LINQ, Group by with Group Join

I have this query in Transact-SQL SELECT t_productospreguntas.d_pregunta, t_productos.d_titulo, t_productosimagenes.d_archivo, t_productosrespuestas.d_respuesta FROM t_productospreguntas INNER JOIN t_productos ON t_productospreguntas.c_usuario...
asked by 04.09.2018 / 05:03
1
answer

Verify that all the fields in a list are equal

I have two related lists in C #: public class HandlingUnit { [StringLength(18)] [ExcelColumn("Handling Unit")] public String HandlingUnit { get; set; } [ExcelColumn("Created on")] public DateTime DateShipped...
asked by 17.08.2018 / 16:21
2
answers

Update list from another list

Working with Visual Studio 2015 I have a list to which I want to update from a list B foreach (var item in entity.ProductoCatalogos) { foreach (var asignado in _listProductoCatalogos) {...
asked by 04.08.2018 / 11:13
0
answers

Read xls with eeplus

I'm working with eeplus and I'm having some problems when it comes to importing information > To use as an example, I have an excel document with the following characteristics: A |B |C |D 1 |Id | Nombre | Apellido 2 |0 | Juan...
asked by 07.08.2018 / 18:28
1
answer

Graph Highchart (column) from Linq query

Although there are a lot of questions, I tried everything and every one of the examples but I can not make what I need work. First I ask the database to look for receipts issued during the year to be grouped by months: View where I choose the ye...
asked by 29.07.2018 / 05:17
0
answers

Error when I try to update 300 data with mvc 5 + linq

Error when I try to update 300 data with mvc 5 + linq, how could I do it so that it does not happen     
asked by 24.07.2018 / 22:11
0
answers

how to get the id of the object that I just saved with EntityState.Added (C # Linq)

I have a function that receives generic objects to save new data with EntityState.Added but I want to add that I return the object with its assigned id public void addDataObject(object obj) { _dbContext.Entry((TEntity)obj).State = Syst...
asked by 10.07.2018 / 18:57
0
answers

Select IN SQL in Linq or EntityFramework

in a system I get a list like that l_res2 = contexto.Ventas.Where(x => in_obj.FechaFin >= x.FechaInicio && in_obj.FechaInicio <= x.FechaFin ).OrderBy(x => x.FechaFin).ToList(); Now, I have a table Sales_States IdSaleId...
asked by 04.07.2018 / 19:22
1
answer

How do I perform a linq query that orders my result in a group?

What I want to do is a group by in my linq query, but I do not really know what the correct syntax is so that it gets it right: Current Code: public List<Section> getSectionsClass() { var context = GetDbContext(); return (from...
asked by 26.06.2018 / 20:48