i created an MVC Project for test on another PC last night
it worked good on that PC but when i want to build it on my own PC it i give error :
the type or namespace name ‘DbModelBuilder’ Could not be found(are you missing…)
how can i solve it ?
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions.Edm.Db;
namespace University.Models
{
public class SchoolContext : DbContext
{
public DbSet<Student> Students { get; set; }
public DbSet<Enrollment> Enrollments { get; set; }
public DbSet<Course> Courses { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
}
}
}
Does this dll exist in your solution?
If it points to DbModelBuilder.dll in a folder in the other PC, it won’t run successfully in your PC.
Edit:
Can you see this ?