sample-dotnet-core-cqrs-api icon indicating copy to clipboard operation
sample-dotnet-core-cqrs-api copied to clipboard

Migrations

Open ccpony opened this issue 5 years ago • 1 comments

Thank you for an excellent framework.

Attempting to run: add-migrations init, I get the following error message in PM:

Unable to create an object of type 'OrdersContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

Any suggestions on how I can get through this issue?

Thank you.

ccpony avatar Jun 29 '20 05:06 ccpony

I think that I could have been more clear. The error message that I included, above, would suggest that I tried to run migrations on "sample-dotnet-core-cqrs-api" but, obviously, that code uses NHibernate I should have referred to "Entity-Framework-Core-Examples". The error message when running "add-migrations", more exactly was:

Unable to create an object of type 'SchoolContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

Watching your excellent Pluralsight course on this topic, I noticed that you didn't include migrations with your workflow. I'd like to include migrations, if possible, but I'm confronted with this error.

Thanks for your help.

ccpony avatar Jul 01 '20 12:07 ccpony