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.
Is there a significant difference between .Find(id) and .Where(x = >x.Id == id) that should compel me to …
.net performance entity-framework dbcontextI am using CodeFirst approach and struck with an issue where I need to convert DbSet to ObjectQuery. This is …
entity-framework-4 linq-to-entities ef-code-first dbcontextpublic interface IDatabaseContext : IDisposable { IDbSet<MyEntity1> Entities1 { get; set; } } public class MyDbContext : DbContext, IDatabaseContext { IDbSet<MyEntity1> …
c# entity-framework dbcontextYeah, you probably think; "God, another one?". Yes, another one. "Object reference not set to an instance of an object." …
c# entity-framework-6 dbcontextI created a separate Class Library project to store the Database Context and Model Classes. In the same solution, I …
asp.net-mvc entity-framework dbcontext scaffoldSo EntityFramework 6 is a lot better testable then previous versions. And there are some nice examples on the internet for …
c# entity-framework dbcontext nsubstitute dbsetIn this simple example, I have two entities: Event and Address. I have a console application running every night to …
c# entity-framework entity-framework-5 dbcontext savechangesI'm trying to reuse an existing database connection so that I can do multiple database operations using a TransactionScope without …
c# entity-framework entity-framework-4.1 dbcontextThis is more of a question of "Why we do things" as my actual problem was solved but I don't …
c# ef-code-first dbcontextThis is similar to questions here and here, but those are old and have no good answers. Let's say I …
c# entity-framework poco dbcontext