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.
I have a project on MVC. We chose EF for our DB transactions. We created some managers for the BLL …
c# entity-framework garbage-collection dbcontext using-statementNote: I am using Entity Framework version 5 Inside my generic repository, I have Add, Edit and Delete methods as below: …
entity-framework ef-code-first dbcontext entity-framework-5Given the following code, how does EF/DbContext knows about the change made to the customer object: class Program { static …
c# entity-framework-4 dbcontext change-trackingI would like know what is the best possible way to implement transactions with DBContext. In particular, Does DbContext.SaveChanges …
entity-framework transactions entity-framework-4.1 dbcontextThere is a many to many relationship between Artist and ArtistType. I can easily add artist ArtistType like below foreach (…
c# entity-framework many-to-many dbcontext[HttpPost] public ActionResult Edit(Movie movie) { if (ModelState.IsValid) { db.Entry(movie).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } …
asp.net asp.net-mvc entity-framework dbcontextI'm using the DbContext class within code that I am creating that is based on the Generic Repositories and Unit …
.net entity-framework dbcontext objectcontextI use many-to-many relationship for my tables. There is a query: var query = from post in context.Posts from tag …
c# linq entity-framework-4 dbcontextI am using EF4 DbContext to provide the model for an ASP.NET MVC app. I use ViewModels to provide …
asp.net-mvc entity-framework-4 viewmodel automapper dbcontextWhen using DbContext in a database-first scenario I found out that adding and deleting entities is very slow compared to …
entity-framework dbcontext