BethanysPieShop icon indicating copy to clipboard operation
BethanysPieShop copied to clipboard

Fixed the issue occurred when running update-database in the package …

Open bozhiqian opened this issue 7 years ago • 1 comments

…maanager:

Unable to create an object of type 'AppDbContext'. Add an implementation of 'IDesignTimeDbContextFactory' to the project,

And appended some missing change needed when upgrading from core 1.* to core 2.0. Thanks Gill for your a lot of excellent courses on Pluralsight that I learned.

Please let know if you don't want to change code so I can abandon my forked reps. Thanks.

bozhiqian avatar Dec 21 '17 11:12 bozhiqian

Please note that running update-database from VS2017 nuget package consule is optional. If you don't generate database as design time, the app will generate at first run. This is because of the following line at "DbInitializer.cs".

_context.Database.EnsureCreated();

bozhiqian avatar Dec 21 '17 11:12 bozhiqian