To add EntityFrameworkCore to your project, update the project.json
file (add new lines into the dependencies
and tools
sections):
"dependencies": { ... "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0", "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.0.0", "Microsoft.EntityFrameworkCore.Design": { "version": "1.0.0", "type": "build" }, }, "tools": { ... "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final" }
Don't forget to run dotnet restore
to actually download these packages from the internet.
If you are using an RDBMS other than Microsoft SQLServer - replace Microsoft.EntityFrameworkCore.SqlServer
with the correct version (Microsoft.EntityFrameworkCore.Sqlite
, Npgsql.EntityFrameworkCore.PostgreSQL
or other - consult your RDBMS documentation for the recommended package).