I create an MVC3 project and first use EFCode for the DataAccess layer.
in my database I have a PackaginInfo table, and in project class I, this is my code:
public class Package
{
public decimal PackageID { get; set; }
public decimal Title { get; set; }
public decimal Cost { get; set; }
public bool isFree { get; set; }
}
public class ParandShopsEntities : DbContext
{
protected override void OnModelCreating(System.Data.Entity.ModelConfiguration.ModelBuilder modelBuilder)
{
modelBuilder.Entity<Package>().MapSingleType().ToTable("PackagingInfo");
}
public DbSet<Package> PackagingInfo { get; set; }
}
when I debug my project, I get the error: Error System.Data.Entity.ModelConfiguration.EntityTypeConfiguration 'does not contain a definition for "MapSingleType" and does not use the extension method "MapSingleType", which takes the first argument of the type "System.Data.Entity.ModelConfiguration. EntityTypeConfiguration "(can you find missing using directive or assembly reference?) E: \ Projects \ ein co \ 89-11-23 \ Parand \ MvcApplication1 \ Models \ ParandShopsEntities.cs
you are welcome. help me
source
share