Spatial Data type support in Entity Framework 5.0 MS SQL Server 2008 introduced two spatial data types, geography and geometry. Geography represents data in a round-earth coordinate system and geometry represent data in a Euclidean (flat) coordinate…
Local Data The Local property of DBSet provides simple access to the entities that are currently being tracked by the context, and have not been marked as Deleted. Local keeps track of entities whose entity state is added, modified and unchanged. For…
Enum in Entity Framework: You can now have an Enum in Entity Framework 5.0 onwards. EF 5 should target .NET framework 4.5 in order to use Enum. Enum can be created for the following data types: Int16 Int32 Int64 Byte SByte You can create and use an E…
以下系列文章为Entity Framework Turial Basics系列 http://www.entityframeworktutorial.net/EntityFramework5/entity-framework5-introduction.aspx ----------------------------------------------------------------------------------------------------------------------…
Setup Entity Framework Environment: Entity Framework 5.0 API was distributed in two places, in NuGet package and in .NET framework. The .NET framework 4.0/4.5 included EF core API, whereas EntityFramework.dll via NuGet package included EF 5.0 specifi…
Multiple Diagrams in Entity Framework 5.0 Visual Studio 2012 provides a facility to split the design time visual representation of the Entity Data Model. This means that you can have multiple diagrams for one Entity Data Model. You can create a new d…
Update Entity Graph using DbContext: Updating an entity graph in disconnected scenario is a complex task. It is easy to add a new entity graph in disconnected mode, but to update an entity graph needs careful design consideration. The problem in upda…
Disconnected Entities: Before we see how to perform CRUD operation on disconnected entity graph, let's see how to associate disconnected entity graph with the new context instance. There are two things we need to do when we get a disconnected entity…
Persistence in Entity Framework There are two scenarios when persisting an entity using EntityFramework, connected and disconnected scenarios. Connected Scenario: This is when an entity is retrieved from the database and persist is used in the same c…
Create Entity Data Model: Here, we are going to create an Entity Data Model (EDM) for SchoolDB database and understand the basic building blocks. Entity Data Model is a model that describes entities and the relationships between them. Let's create fi…