ALİ AK
ALİ AK

Reputation: 25

The type or namespace name 'DatabaseContext' could not be found

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

Upvotes: 1

Views: 172

Answers (1)

Victor
Victor

Reputation: 8890

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 or internal. 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)

Upvotes: 2

Related Questions