Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1.     public class UserConfig : IEntityTypeConfiguration<User>
  2.     {
  3.         public void Configure(EntityTypeBuilder<User> builder)
  4.         {
  5.             builder.Property(p => p.FirstName).IsRequired();
  6.             builder.Property(p => p.LastName).IsRequired();
  7.             builder.Property(p => p.MiddleName).IsRequired();
  8.             builder.Property(p => p.JobPosition).IsRequired();
  9.  
  10.             builder.HasIndex(i => i.ActiveDirectoryName).IsUnique();
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement