Cannot open database?
Caballep opened this issue · 1 comments
Caballep commented
Im having this error:
**_An exception of type 'System.Data.SqlClient.SqlException' occurred in Microsoft.EntityFrameworkCore.dll but was not handled in user code
Additional information: Cannot open database "PhotoGallery" requested by the login. The login failed._**
At this line:
if (!context.Albums.Any()) inside DbInitializer.cs
chsakell commented
Did you follow the exact instructions and create the required database? What is your connection string in the appsettings.json?