A new assembly was recently added to the project.

If you receive the error, "Strong name signature could not be verified," download and run the latest version of SkipStrongNames.


This site is dedicated to working with and contributing to the Entity Framework code base. If you want to use an officially supported Entity Framework release to develop your applications then head to msdn.com/data/ef where you can find useful documentation, tutorials, samples, and videos.

The Entity Framework is actively developed by the Entity Framework team which is assigned to the the Microsoft Open Tech Hub and in collaboration with a community of open source developers. Together we are dedicated to creating the best possible data access experience for .NET developers.

Getting and Building Code

The first order of business is to make sure you can build the code on your machine.

  1. The easiest way to work with the code base is to install Visual Studio 2012. You can also work with any other IDE provided you have .NET Framework 4.5 and MSBuild on your machine.
  2. To run the unit tests, you will need SQL Server Express installed with SQL Server and Windows Authentication mode enabled. The Windows username that you use for development must have the “sysadmin” role. The easiest way to ensure this is to install SQL Express while logged in as this user as opposed to having someone else install SQL Express on the machine.
  3. Make sure you have git installed. Alternate git clients
    • TortoiseGit is highly recommended, because it offers graphical log/tree views and diff/merge experience.
    • Posh-Git is highly recommended for PowerShell users.
    • Git Source Control Provider is an optional component which integrates Git into Visual Studio.
  4. Download SkipStrongNames, and unzip it. From an elevated command prompt, run “skipstrongnames -e" to allow you to run unit tests against the delay-signed binaries.
  5. Using your preferred git client clone our git repo located at
    git clone https://git01.codeplex.com/entityframework
  6. If you installed Visual Studio, you can now open the EntityFramework.sln file in the root of the source code and build using Visual Studio. Alternatively, there is a Build.cmd file that will build the code base and run the tests from the command line. Note: Before building you may need to obtain NuGet packages from the OuterCurve Foundation NuGet public feed*.

    build /t:RestorePackages
    build
  7. Building the code will produce a .nupkg file for the EntityFramework NuGet package in bin\Release\. The Updating Applications to use EF6 page provides details on how to use this package in an application.

*By running build RestorePackages, you will be initiating the download of other software from a NuGet-based feed that is owned by the Outercurve Foundation. You are responsible for locating, reading and complying with the license terms that accompany each such software. Each software that you obtain through this feed is licensed to you by its respective owner. We grant you no rights for third-party software from this feed.

Running Tests

Entity Framework solution contains three test projects (UnitTests, FunctionalTests, VBTests) which are written using xUnit. Most straightforward way to run all tests is executing "Build.cmd /t:Test" from the command line. Tests can also be run through Visual Studio 2012 using an xUnit runner extension, such as xUnit.net runner for Visual Studio 2012, TestDriven.NET or ReSharper.

Signed Nightly Builds

Signed nightly builds of the Entity Framework code base are made available

Contribute

There are many ways to contribute to Entity Framework including contributing code. Check out the contributors page to see who is already contributing to Entity Framework. Find out how you can participate here.

Roadmap

Want to know what the future holds for Entity Framework? We update our roadmap regularly and we post specific feature specifications publicly for review.

Questions?

Send us your questions through the discussion forums or check the FAQ to see if your question has already been answered.

Last edited Feb 2, 2013 at 6:20 AM by BriceLambson, version 76

Comments

Rayzen Aug 1 at 3:18 AM 
There is a problem in ef 6.1.1 while using WithRequiredPrincipal, The example Code like this

public partial class MUser
{
public int ID { get; set; }
public string Name { get; set; }

public MUserInfo MUserInfo { get; set; }
}

public partial class MUserInfo
{
public int UserID { get; set; }
public Nullable<bool> IsActive { get; set; }

public MUser MUser { get; set; }
}

public class MUserMap : EntityTypeConfiguration<MUser>
{
public MUserMap()
{
this.HasKey(t => t.ID);
this.Property(t => t.ID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
this.Property(t => t.Name).HasMaxLength(100);
this.ToTable("MUser");
this.Property(t => t.ID).HasColumnName("ID");
this.Property(t => t.Name).HasColumnName("Name");

this.HasRequired(a => a.MUserInfo).WithRequiredPrincipal(t => t.MUser);
}
}

public class MUserInfoMap : EntityTypeConfiguration<MUserInfo>
{
public MUserInfoMap()
{
this.HasKey(t => t.UserID);
this.Property(t => t.UserID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
this.ToTable("MUserInfo");
this.Property(t => t.UserID).HasColumnName("UserID");
this.Property(t => t.IsActive).HasColumnName("IsActive");
}
}

The using Code is

context.MUserInfos.Include(t => t.MUser).ToList();

While using EF6.0 and EF6.1.0 ,then generate sql is:

SELECT
[Extent1].[UserID] AS [UserID],
[Extent1].[IsActive] AS [IsActive],
[Extent2].[ID] AS [ID],
[Extent2].[Name] AS [Name]
FROM [dbo].[MUserInfo] AS [Extent1]
INNER JOIN [dbo].[MUser] AS [Extent2] ON [Extent1].[UserID] = [Extent2].[ID]


While using EF6.1.1 ,then generate sql is:

SELECT
[Extent1].[UserID] AS [UserID],
[Extent1].[IsActive] AS [IsActive],
[Join1].[ID] AS [ID],
[Join1].[Name] AS [Name]
FROM [dbo].[MUserInfo] AS [Extent1]
LEFT OUTER JOIN (SELECT [Extent2].[ID] AS [ID], [Extent2].[Name] AS [Name], [Extent3].[UserID] AS [UserID]
FROM [dbo].[MUser] AS [Extent2]
LEFT OUTER JOIN [dbo].[MUserInfo] AS [Extent3] ON [Extent2].[ID] = [Extent3].[UserID] ) AS [Join1] ON [Extent1].[UserID] = [Join1].[UserID]

Please check it, thank you.