日期:2014-05-17 浏览次数:20992 次
public partial class Feature
{
public int FeatureID { get; set; }
public string FeatureName { get; set; }
}
public class FeatureMap : EntityTypeConfiguration<Feature>
{
public FeatureMap()
{
// Primary Key
this.HasKey(t => t.FeatureID);
// Properties
this.Property(t => t.FeatureName)
.IsRequired()
.HasMaxLength(50);
// Table & Column Mappings
this.ToTable("Feature");
this.Property(t => t.FeatureID).HasColumnName("FeatureID");
this.Property(t => t.FeatureName).HasColumnName("Feature");
}
}