My code fisrt gets some erros

poz1Booxidogy

New Member
I'm building an mvc application and using code first. But when I'm try access the table, the mvc throw this error:\[code\]Invalid object name 'dbo.Membro'.\[/code\]My Context is:\[code\]public class JethroContext : DbContext { public DbSet<Area> Areas { get; set; } public DbSet<BaseIgreja> BaseIgrejas { get; set; } public DbSet<Igreja> Igrejas { get; set; } public DbSet<Celula> Celulas { get; set; } public DbSet<Membro> Membros { get; set; } public DbSet<Distrito> Distritos { get; set; } public DbSet<Setor> Setores { get; set; } public DbSet<Usuario> Usuarios { get; set; } public DbSet<Ministerio> Ministerios { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); } }\[/code\]Searching on Google I found the solution, but not worked for me.\[code\]Database.SetInitializer<JethroContext>(null);\[/code\]
 
Back
Top