Questions tagged as 'linq'

0
answers

Default value in MVC5

I need to create a sequence that is inserted by default, that is, I need that when inserting a record it is inserted by default, example fn000001,fn000002, ect. help     
asked by 02.07.2018 / 15:03
1
answer

How to delete an Entity record with a linq query?

What I want is to delete an entity framework record through a linq query that only gives me a slight error: linq query code: var context = GetDbContext(); var listadoV = from Ar in context.archivo wher...
asked by 22.06.2018 / 23:44
1
answer

Pass a list from the action in my view in MVC 5

I have the following query in the Action Then in my Vista I try to show the table in the following way using @ item.cantRevised I would also like to know if in MVC 5 you can pass a list in this case consult with LINQ through t...
asked by 16.06.2018 / 20:44
0
answers

how to delete a record from a table using linq and sqlserver and c #

someone some example code how to delete a record from a table using linq and sqlserver and c # I want the record to be deleted when I press the red line what is stored in a sql server table but do so by calling a store procedure    ...
asked by 18.05.2018 / 08:39
2
answers

Select a list of two common related elements in sql with entityFramework and linq

I have a list of people that are related to a committee table and another table types person, I need to return the list of people of a committee and also return the list of people of a type note: return the people that I return from the relation...
asked by 27.07.2018 / 19:29
1
answer

LINQ to Entities does not recognize the method

I have a LINQ statement and use a static function in the where section. The static class is called Funciones but it always returns an error when I execute it, the description of the error is:    LINQ to Entities does not recogni...
asked by 27.04.2018 / 22:39
0
answers

Update a record in the database with ajax?

What I'm looking for is updating a database record by recommending a more experienced programmer who told me that he would use POST to structure the following code. <script> $("#txtHoraSalida").val(hs); $("#txtGafete").ke...
asked by 07.04.2018 / 18:16
1
answer

obtenet information field in select distinct sum Linq

I have a list of elements as follows public class MedicamentoDevolverDto { public int IdMedicamento { get; set; } public string CodigoMedicamento { get; set; } public string Medicamento { get; set; } public int StockActualC...
asked by 10.03.2018 / 16:05
1
answer

Improve the performance of a collection with multiple records

I have the following code: For Each Subitem In lstGastoResumen_Area Dim MesRealSub Dim MesPPTOSub MesRealSub = Aggregate y In lstGastoResumen Where y.Area = Subitem And y.Anio = Anio1 Into Sum(y.FebRealSoles) MesPPTOSub = Aggr...
asked by 22.02.2018 / 16:38
2
answers

Update database from View in MVC asp.net Core 2.0

I hope to express myself clearly and be able to get some help. I'm stuck with updating some fields in my database table from the View. Currently I could make it work but only update the data of the first result. How should it work? Payment...
asked by 15.02.2018 / 22:40