Guest User

Untitled

a guest
Dec 10th, 2019
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. The property 'User.JobPosition' is of type 'JobPosition' which is not supported by current database provider. Either change the property CLR type or ignore the property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'
  2.  
  3. public class UserConfig : IEntityTypeConfiguration<User>
  4. {
  5.     public void Configure(EntityTypeBuilder<User> builder)
  6.     {
  7.         builder.Property(p => p.FirstName).IsRequired();
  8.         builder.Property(p => p.LastName).IsRequired();
  9.         builder.Property(p => p.MiddleName).IsRequired();
  10.         builder.Property(p => p.JobPosition).IsRequired();
  11.  
  12.         builder.HasIndex(i => i.ActiveDirectoryName).IsUnique();
  13.     }
  14. }
  15. public class User : Entity
  16. {
  17.     public JobPosition JobPosition { get; set; }
  18. }
RAW Paste Data