using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class UserInfoLastModMap : EntityTypeConfiguration { public UserInfoLastModMap() { // Primary Key this.HasKey(t => t.Id); // Properties this.Property(t => t.Id) .IsRequired() .HasMaxLength(50); this.Property(t => t.UserNo) .IsRequired() .HasMaxLength(50); // Table & Column Mappings this.ToTable("UserInfoLastMod"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.UserNo).HasColumnName("UserNo"); this.Property(t => t.TimeLastMod).HasColumnName("TimeLastMod"); } } }