I have recently started ASP.net core project with multilayered architecture, where CatalogDbContext and StartUp class in different layers:
I want to add migrations to DroneStore.Data layer. I change in command prompt current directory to ../DroneStore.Data/ and add command:
dotnet ef migrations add Initial
And got an error:
Unable to create an object of type 'CatalogDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
When I change current directory to ../DroneStore.Web/ and add this command i got error:
Your target project 'DroneStore.Web' doesn't match your migrations assembly 'DroneStore.Data'. Either change your target project or change your migrations assembly
Any suggections?