First off, thank you for creating this sample project! I've successfully run the project using the in memory db with no issues. I followed the instructions on the README and attempted to run the migrations to create the initial Catalog and Identity databases.
I've got .NET Core 2 SDK installed on my Windows 10 machine. I have SQL Server 2014 installed as well.
// these are the default connection strings included with the project
"ConnectionStrings": {
"CatalogConnection": "Server=(localdb)\\ProjectsV13;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.CatalogDb;",
"IdentityConnection": "Server=(localdb)\\ProjectsV13;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.Identity;"
},
dotnet ef database update -c catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj
dotnet ef database update -c appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj
Neither of these work.
I'm not sure where this problem stems from. It seems as though the database is never being created, which leads to the
System.Data.SqlClient.SqlException (0x80131904): Cannot open database "Microsoft.eShopOnWeb.Identity" requested by the login. The login failed.
Login failed for user 'DESKTOP-HICGBT3\Danny'.
errors.
I've created plenty of LocalDB databases with no issues.
Error Number:4060,State:1,Class:11
An error occurred while calling method 'BuildWebHost' on class 'Program'. Continuing without the application service provider. Error: One or more errors occurred. (Cannot open database "Microsoft.eShopOnWeb.Identity" requested by the login. The login failed.
Login failed for user 'DESKTOP-HICGBT3\Danny'.)
Unable to create an object of type 'CatalogContext'. Add an implementation of 'IDesignTimeDbContextFactory<CatalogContext>' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.