Questions tagged as 'entity-framework'

2
answers

EF relationship

I know it's something basic, but how do I make a relationship between Entities using the Entity Framework? I have the Contest table and the StatusContacts. The Contest table must have an associated status (Normal, Canceled and etc.). Below...
asked by 16.12.2016 / 19:49
1
answer

Could not load file or assembly 'EntityFramework, Version = 5.0.0.0 or one of its dependencies

I would like to know if someone could help me with this error, as I am trying to enable Migrations in a project and this error appears at the time of giving the enable-migrations command in the manager console of visual studio packages....
asked by 21.01.2017 / 00:19
1
answer

Error in parameter constructor name ObjectParameter C #

When I pass a string variable to the ObjetParameter parameter it gives the following error. string nomeParameter = sql.Substring(startPosition, stopPosition - startPosition); ObjectParameter parameter = new ObjectParameter(nomeParameter...
asked by 23.06.2017 / 21:03
1
answer

Perform database mapping for DbSetT.SqlQuery ()

Error while executing SqlQuery from my DbSet.    There is no mapping of the System.Data.Entity.Core.Objects.ObjectParameter object type to a native type managed provider. I would like to leave my generic database, so I put the parameters...
asked by 23.06.2017 / 22:07
1
answer

List of View objects for controller

I have two Client and Address entities where the client has multiple addresses. At the time of filling out the form, the user can add two addresses in the same form and at the time of the Submit, would like to receive the data of the client and...
asked by 19.10.2016 / 04:33
2
answers

Entity Framework Model and Domain Class

The Entity Framework notation is "very polluted" if you take into account how I am used to defining the Domain classes, I wanted to know if it is correct to have an EF template class to represent the database data and one to represent the domain...
asked by 29.07.2016 / 15:47
1
answer

Is it possible to leave connectionString dynamically?

I have read something and know that it is possible to leave a connectionString dynamically in an ASP.NET MVC application. But is it possible to create n connections where each authenticated user on the system has its own connection to a part...
asked by 12.08.2016 / 15:57
1
answer

Give preference to the results that have the parameter passed in the Entity Framework [duplicate]

I'm trying to implement a data solution that first displays the values that have the passed parameter and then pass the other parameters. Example: In a product table you have the following data: Coca-Cola -> Coca Cola Company Pepsi...
asked by 28.03.2016 / 15:04
1
answer

How to use the service based database item in Visual Studio 2015?

I'm doing an Entity Framework online course in which the course uses Visual Studio in the 2012 Express version, since I'm using Visual Studio Enterprise 2015. And during the course it asks to create a new data called " service based database "....
asked by 09.02.2016 / 15:31
2
answers

LINQ update of all listed items (changing the status of all listed items)

I have a Linq that displays data listed according to the required filters (date and unit) by the user and another filter to validate a code with another table (which are not the case). I would like to know how I can from a "reconcile" button, ch...
asked by 29.02.2016 / 21:31