class DatabaseContext:DbContext
{
public DatabaseContext(DbContextOptions<DatabaseContext> options):base(options)
{
}
}
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
services.AddDbContext<DatabaseContext>
}
I have tried uninstall then reinstall EntityFrameworkCore.But It didnt work.How can I fix it.Thank you in advance
CodePudding user response:
Classes, records, and structs declared directly within a namespace (in other words, that aren't nested within other classes or structs) can be either
public
orinternal
.internal
is the default if no access modifier is specified.
Class, record, and struct member accessibility
Internal types or members are accessible only within files in the same assembly they are defined: internal
(C# Reference)