Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aspnet/core/data/ef-mvc/ updates for 2.0 #3864

Tratcher opened this issue Aug 1, 2017 · 1 comment

aspnet/core/data/ef-mvc/ updates for 2.0 #3864

Tratcher opened this issue Aug 1, 2017 · 1 comment


Copy link

@Tratcher Tratcher commented Aug 1, 2017

Signoff issue: aspnet/Release#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.

        public static void Main(string[] args)
            var host = BuildWebHost(args);
            using (var scope = host.Services.CreateScope())
                var services = scope.ServiceProvider;
                    var context = services.GetRequiredService<SchoolContext>();
                catch (Exception ex)
                    var logger = services.GetRequiredService<ILogger<Program>>();
                    logger.LogError(ex, "An error occurred while migrating the database.");

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?

@Rick-Anderson adds - go thru entire series

Copy link

@alexandr-osprey alexandr-osprey commented Apr 22, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2.0 scenarios
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants