以下系列文章为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…
Download Sample Project: Download sample project for basic Entity Framework tutorials. Sample project includes SchoolDB.mdf for SQL Server 2012. It also includes SchoolDB.sql script if you are using a different version of SQL Server.…
Colored Entity in Entity Framework 5.0 You can change the color of an entity in the designer so that it would be easy to see related groups of entities in the designer from Visual Studio 2012 onwards. To change the color of an entity, select entity i…
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…
Lazy Loading: One of the important functions of Entity Framework is lazy loading. Lazy loading means delaying the loading of related data, until you specifically request for it. For example, Student class contains StudentAddress as a complex property…
Eager Loading: Eager loading is the process whereby a query for one type of entity also loads related entities as part of the query. Eager loading is achieved using the Include() method. In the following example, it gets all the students from the dat…
Table-Valued Function in Entity Framework 5.0 Entity Framework 5.0 supports Table-valued functions of SQL Server. Table-valued functions are similar to stored procedure with one key difference: the result of TVF is composable which means that it can…
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…
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…