You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Major item:
All the code around DbInitializer needs to be moved from Startup to Main. The old pattern is now causing problems with migrations.
public static void Main(string[] args)
{
var host = BuildWebHost(args);
using (var scope = host.Services.CreateScope())
{
var services = scope.ServiceProvider;
try
{
var context = services.GetRequiredService<SchoolContext>();
DbInitializer.Initialize(context);
}
catch (Exception ex)
{
var logger = services.GetRequiredService<ILogger<Program>>();
logger.LogError(ex, "An error occurred while migrating the database.");
}
}
host.Run();
}
Standard cleanup:
Redo screenshots, update versions, redo command line sample output.
Minor items:
Microsoft.EntityFrameworkCore.SqlServer no longer needs to be added, it's part of the metapackage.
Create, Read, Update, and Delete operations: Edge won't let you enter invalid dates in a datetime-local field. You always get a date picker. Use a different validation example?
Sorting, filtering, paging, and grouping: Why doesn't PaginatedList.cs have a namespace?
I've been struggling with error "LocalDb connection : Login failed" during migrations or any tries to connect to localdb. This really helped me. Such a treasonous problem.
Uh oh!
There was an error while loading. Please reload this page.
https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/
Signoff issue: https://github.com/aspnet/Release/issues/176
Major item:
All the code around DbInitializer needs to be moved from Startup to Main. The old pattern is now causing problems with migrations.
Standard cleanup:
Redo screenshots, update versions, redo command line sample output.
Minor items:
@bricelam
@Rick-Anderson adds - go thru entire series
The text was updated successfully, but these errors were encountered: