I create a project by MVC3 and use EFCode first for DataAccess Layer.
in my DataBase I have PackaginInfo Table, and in project I carete Package Class, 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 error: Error System.Data.Entity.ModelConfiguration.EntityTypeConfiguration' does not contain a definition for 'MapSingleType' and no extension method 'MapSingleType' accepting a first argument of type 'System.Data.Entity.ModelConfiguration.EntityTypeConfiguration' could be found (are you missing a using directive or an assembly reference?) E:\Projects\ein co\89-11-23\Parand\MvcApplication1\Models\ParandShopsEntities.cs
pls. help me