I'm still testing this out (on dnx-coreclr-win-x64.1.0.0-rc2-16177 at the moment), but they have made a lot of progress since @bricelam answered. They now have some EF7 docs including some on CoreCLR support
Here's part of my
project.json:
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc2-*",
"EntityFramework.Core": "7.0.0-rc2-*",
"EntityFramework.Relational": "7.0.0-rc2-*",
"EntityFramework7.Npgsql": "3.1.0-rc1-2",
},
"frameworks": {
"dnxcore50": {}
}
You will probably need to add https://www.myget.org/F/npgsql-unstable/api/v3/index.json to your NuGet feeds in order to pull that package.
EDIT: I now specify an exact version of EntityFramework7.Npgsql": "3.1.0-rc1-2" and use only this feed in my NuGet.config: https://www.myget.org/F/aspnetrelease/api/v3/index.json
EDIT: This is all now available in https://api.nuget.org/v3/index.json
In Startup.cs:
public void ConfigureServices(IServiceCollection services)
{
services.AddEntityFramework()
.AddNpgsql()
.AddDbContext<YourDbContext>(options => options.UseNpgsql("your connectionString"))
;
}