I have a problem scaffolding and doing migrations from a class library with multiple DBContexts. I found a command line argument that looks like this for migrations:
I haven't tried putting the data-layer in a separate project yet, but I do have multiple DbContexts in a single Web API project. It should work with separate projects too.
Using the latest syntax (v1.0.0), you create your migrations like this:
dotnet ef migrations add -o -c
Where is the full class-name of your DbContext -- like MyProject.Data.MyDbContext
I put my migrations for different contexts into different directories, but I don't think you have to. Just make sure they have different migration-name values.