Questions tagged as 'entity-framework'

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

Error when registering object with list of objects with reference to other objects obtained from another context ENTITY FRAMEWORK C #

I'm having a problem. This is my domain: Class1 List classes2; Class2 Class3 class3; Class4 class4; To create class 2, I consult a context that returns Class 3 and Class 4 (both 2 already exist) After creating it (class2),...
asked by 30.08.2018 / 17:37
0
answers

Error in Linq query

I have a DropDownList with which I want to bring the records according to the item selected, when I click on the search button I get the following error:    The entity or complex type 'DB_ALMACENModel.Product' can not be   const...
asked by 18.07.2018 / 06:10
1
answer

When inserting an array in Sql Server the assigned Id messes up the array [closed]

Sorry for the title but I did not know how to describe the situation. The situation is as follows: I have a project in VS2017, asp.net core where I have a method that enters an array into the database. It is an array of a table that I created wi...
asked by 06.07.2018 / 04:24
0
answers

Is it better to use ADO.NET or EF to manipulate database objects from MVC? [closed]

I currently use the Entity Framework to make database connections from C # with MVC, but I find it rather tedious to be adding the tables and everything to the database model in the project, and if something is modified I have to delete and re-a...
asked by 01.06.2018 / 00:35
2
answers

ASP.Net MVC 5 Scaffolding Template Does not show the related property in the View Details

Create the Book Model: Then the Model Matter Then I created the Controlers and assigned them the Models and generated the Views, here in the View Details.cshtml, when I navigate from the list of Books records through the Detail link,...
asked by 19.12.2017 / 21:57
0
answers

Why does an unmapped property that returns another property return me an error?

Good to see, I have a navigation error in an EF class where Linq navigation is not supported, I would like to know if someone happened this and if they have any suggestions on how to solve my problem. Error: The specified type member 'Prop2'...
asked by 11.08.2017 / 20:10
0
answers

LINQ: Query GROUP BY conditional COUNT

How is it possible to move this type of operation to Linq ... in SQL:    COUNT (CASE WHEN VALUE="EXAMPLE" then 1 else = 0 END) Within a GROUP BY statement In linq? from join... from... group new { contador = tabla.Count(x=...
asked by 22.06.2017 / 14:19
0
answers

WCF error when invoking service

I have a problem is a new VS installation but I want to get a list of 2 connected tables I use the entity and when debugging returns the values of the list monsrando the count but at the time of showing the service gives me the error, They have...
asked by 29.04.2017 / 06:14
1
answer

mvc Views with Entity Framework [closed]

I am starting a new MVC project with Entity Framwork and I need to save information in 3 different tables, for this I have created a stored procedure. What I want to do is create a form from that procedure. What can I do to create the form? C...
asked by 03.05.2017 / 18:57