Created
September 28, 2017 10:31
-
-
Save ksysiekj/f6417ed6ccffe6453d0ed9684f63b2ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShiftMap : EntityTypeConfiguration<Shift> | |
{ | |
public ShiftMap() | |
{ | |
// Table & Column Mappings | |
this.ToTable("Shift", "HumanResources"); | |
// Primary Key | |
this.HasKey(t => t.ShiftID); | |
// Properties | |
this.Property(t => t.Name) | |
.IsRequired() | |
.HasMaxLength(50); | |
this.Property(t => t.ShiftID).HasColumnName("ShiftID").IsRequired(); | |
this.Property(t => t.Name).HasColumnName("Name").IsRequired(); | |
this.Property(t => t.StartTime).HasColumnName("StartTime").IsRequired(); | |
this.Property(t => t.EndTime).HasColumnName("EndTime").IsRequired(); | |
this.Property(t => t.ModifiedDate).HasColumnName("ModifiedDate").IsRequired(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment