Questions tagged as 'linq'

3
answers

I want to return a list of a join linq but I do not know how to do it, I do not know what goes in the List ????

I already try to create an object from the query of the join bone of the attributes that I want to see but still I can not make the return public List<????> ListaJoin() { var resultado = (from ad in model.AlumnoDireccion...
asked by 06.04.2017 / 21:06
1
answer

Error in Enumerable.Except method of LinQ

I have the following code: var vistaRecibos = (from r in ctx.RECIBOSPAGO_DETALLE_GENERAL select new { r.idrecibopago,...
asked by 27.03.2017 / 21:11
3
answers

SQL query, LINQ

I have the following query SELECT tp.Nombre, tp.IdTipoContacto FROM TipoContacto tp LEFT JOIN Contacto c on tp.IdTipoContacto = c.IdTipoContacto WHERE NOT tp.Nombre = 'Compañia' This brings me back Facturacion 2 Facturacion...
asked by 08.09.2016 / 19:16
3
answers

Query Variable EntityFramework

I want to bring only some fields of what the consultation brings me, var result = dbContext.Cliente.Include("Contacto.Cliente").ToList(); this brings me the following: "Objects": [ { "IdCliente": 3, "Identificacion": 10, "Nombre":...
asked by 02.09.2016 / 22:34
1
answer

Go from Linq to Sql

I have the following expression from Linq: Tabla.Skip(ind_pag).Take(cant_filas).ToList() How would it be on MySql ???     
asked by 21.08.2016 / 00:13
1
answer

Create Id in a DataGridView

Hi, I have a DGV in which, through a button, I want to create its correlative code when I press the button private void btnNuevoClasificacion_Click(object sender, EventArgs e) { ClasificacionTalla ct = new ClasificacionTalla();...
asked by 30.04.2016 / 18:55
1
answer

How to know if I am in the last row of a DataGridView

When I want to check if I find myself in the last row, I get an error if (dgvClasificacion.CurrentRow.Index == dgvClasificacion.Rows.Count - 1) { dgvClasificacion.Rows.Add(); } Reference to object not establishe...
asked by 01.05.2016 / 03:36
1
answer

Error trying to update with ASP.NET MVC5 entity framework

I have the following problem when I try to update the Gender object, it shows me the following error when I do the update, help try { Common.Entities.Gender gender = this.genderRepository.FindGenderId(genderModel.GenderId);...
asked by 04.01.2019 / 14:24
1
answer

How to Group Attribute in a class with C #

I would like you to help me I have 3 instances of a class that have the attributes period, soles_vac, dollars_vac, expenses by which in each instance I have in the same period different amounts in different attributes I would like you to only...
asked by 02.01.2019 / 19:37
0
answers

add column type DateTime

What I want to do is add the column with the same IdExamen that throws the result and subtract me with another of the same type. this is what I tried without success, someone who has gone through I am, thanks public JsonResult ContarTiempo(...
asked by 16.12.2018 / 16:12