For the database
I'm not sure if database migrations are fully supported yet. For now, I'm setting things up manually, which isn't bad or cumbersome at all. What this means is I create a blank database, then run a set of scripts against it to create and populate tables. I then write the context and model classes by hand.
Here is a sample project I've put together: https://github.com/mw007/adventure-works. It's very simple and doesn't do much, but is meant to showcase everything working.
It's an ASP.NET Core RC2 application, with EntityFrameworkCore and PostgreSQL support via NpgSQL. The context and model classes are in the Models
directory.
Feel free to comment back with any specific questions about the context or model. The database scripts I referenced earlier are in the dockerfiles/adventureworks
directory.
For the dotnet commands
Generally, there are two things you'll want to remember: dotnet restore
and dotnet run
.
dotnet restore
pulls down all dependencies defined in your project.json
file.
dotnet run
runs your app (or anything specific defined in your project.json
).