Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DV wrong reference
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
// This is right
services.AddSingleton<IProductService, ProductService>();
// this is wrong and DV should fail
services.AddSingleton<IMyDbContext, MyDbContext>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment