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.
It took me way too long to find a solution to the scenario described below. What should seemingly be a …
entity-framework associations code-first dbcontextI'm building a service application using Web API, .Net Core and EntityFramework Core. For configuring options in my DbContext I'm …
entity-framework dependency-injection asp.net-web-api2 dbcontext entity-framework-coreI've been able to mock DbSet's from entity framework with Moq using this link. However, I would now like to …
c# entity-framework moq dbcontextI have migrated a web application project from .NET Core 2.1 to 3.1 (also EF Core from 2.1.1 to 3.1.0). After the migration, some …
c# unit-testing entity-framework-core dbcontext .net-core-3.1MVC 3 + EF 4.1 I'm choosing between two approaches to deal with DbContext: Instantiate in Application_BeginRequest, put it into HttpContext.Current.…
asp.net-mvc entity-framework entity-framework-4.1 poco dbcontextSometime when using Entity Framework Code First, the default conventions do not create the database type you want. For instance …
c# entity-framework dbcontextI have a problem with EF 4.1 not calling OnModelCreating so that I can configure tables etc. I have an existing …
c# entity-framework-4.1 dbcontextI'm trying to work with EF CodeFirst under Oracle with ODP.net. This is my DbContext class: public class MyCEContext : …
asp.net-mvc-3 oracle ef-code-first odp.net dbcontextI'm using EF Core and DatabaseFirst approach. My dbContext is created automatically by Scaffold-DbContext command. I need to add some …
c# entity-framework-core dbcontext partial partial-classesI am having trouble sending a SQL statement through a DbContext using context.Database.ExecuteSqlCommand(). I am trying to execute …
sql-server-2008 dbcontext