| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class ViewAttendMeetMap : EntityTypeConfiguration<ViewAttendMeet>
- {
- public ViewAttendMeetMap()
- {
- // Primary Key
- this.HasKey(t => t.AMNo);
- // Properties
- this.Property(t => t.Name)
- .HasMaxLength(50);
- this.Property(t => t.Mobile)
- .HasMaxLength(15);
- this.Property(t => t.AMNo)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.AMName)
- .HasMaxLength(100);
- this.Property(t => t.AMYear)
- .IsFixedLength()
- .HasMaxLength(4);
- this.Property(t => t.GraduationYear)
- .IsFixedLength()
- .HasMaxLength(4);
- // Table & Column Mappings
- this.ToTable("ViewAttendMeets");
- this.Property(t => t.Name).HasColumnName("Name");
- this.Property(t => t.Mobile).HasColumnName("Mobile");
- this.Property(t => t.AMNo).HasColumnName("AMNo");
- this.Property(t => t.AMName).HasColumnName("AMName");
- this.Property(t => t.AMYear).HasColumnName("AMYear");
- this.Property(t => t.GraduationYear).HasColumnName("GraduationYear");
- }
- }
- }
|