BethanysPieShop
BethanysPieShop copied to clipboard
Fixed the issue occurred when running update-database in the package …
…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.
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();