Top "Dbcontext" questions

The DbContext API first shipped with Entity Framework version 4.1 and provides a more productive surface for working with the Entity Framework and can be used with the Code First, Database First, and Model First approaches.

Entity Framework relationships between different DbContext and different schemas

So, I have two main objects, Member and Guild. One Member can own a Guild and one Guild can have …

c# entity-framework foreign-keys repository dbcontext
Entity Framework DbContext Connection string in app.config/web.config not being seen

So, I have followed this instruction from ADO.NET team blog to try to make a small test project. I …

entity-framework ef-code-first dbcontext database-first
Manage the lifetime of dbContext

I would like to tie the lifetime of a dbContext to the lifetime of a session, to - for example …

entity-framework asp.net-mvc-4 dbcontext
"No executable found matching command dotnet-ef" error with EF Core database-first

As you know, the newest version of Visual Studio 2017 abandons the 'project.json' and uses .csproj instead. I'm using the …

visual-studio entity-framework dbcontext database-first
EF5 db.Database.SqlQuery mapping returned objects

I have two C# classes public class SearchResult { public int? EntityId { get; set; } public string Name { get; set; } public Address …

c# sql entity-framework dbcontext
npgsql schema "dbo" does not exist

i have a problem similar to Entity Framework 5.0 PostgreSQL (Npgsql) default connection factory I have Npgsql declared in app.config : &…

asp.net-mvc-4 dbcontext npgsql
Avoid Entity Framework Error with Multiple Tasks Running Concurrently on Same DbContext

I have a WebApi controller in a Dotnet Core project running Entity Framework Core with Sqlite. This code in an …

c# sqlite .net-core entity-framework-core dbcontext
Using multiple dbcontext instances and dependency injection

This is kind of a similar question I asked here a few weeks ago with one significant change in requirement. …

c# entity-framework ninject autofac dbcontext
How do I stop Entity Framework from generating BOTH ObjectContext and dbContext

Background Visual Studio 2012 NEW Model.EDMX file created in VS2012 Copied some of the EDMX xml from a previously created …

entity-framework dbcontext objectcontext