Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

'AppDbContext' does not contain a definition for 'InstructionalMaterials'

$
0
0

I get the above error while building my project yet the code below clearly shows that InstructionMaterials does exist in the EF context class. Any ideas?

modelBuilder.Entity<InstructionalMaterials>(entity =>
{
	entity.HasKey(e => e.InstructionalMaterialId)
		.HasName("PK_InstructionalMaterials");

	entity.ToTable("InstructionalMaterials", "DIMS");

	entity.Property(e => e.Copyright)
		.HasColumnType("datetime2(3)")
		.HasDefaultValueSql("getdate()");

	entity.Property(e => e.Price).HasColumnType("decimal");

	entity.Property(e => e.Status).IsRequired();

	entity.Property(e => e.Title).IsRequired();
});

I have four different entity items that are doing this.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>