Getting “Could not resolve a service of type ..” after upgrading to Core 2 Preview 2
问题 I've just upgraded to ASP.NET Core 2 Preview 2 and ran into a problem with the depedency injection. I get Could not resolve a service of type 'LC.Tools.API.Data.GenericDbContext' for the parameter 'context' of method 'Configure' on type 'LC.Tools.API.Startup' when running the project. I didn't have this problem when using the old version. DbContext (GenericDbContext): namespace LC.Tools.API.Data { public class GenericDbContext : DbContext { public GenericDbContext(DbContextOptions