ASP.NET Core RC2 Seed Database
问题 My problem is i am trying to seed an Entity Framework Core database with data and in my mind the below code show work. I've realised that this should not be called in the ApplicationDbContext constructor and should be called from the startup but im not sure how to do this. EDIT: Based on the solution provided by Ketrex, my solution is as follows: Startup.cs: public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { ... app.ApplicationServices