this.Property(p => p.Name)
                .IsRequired()
                .HasMaxLength(new int?(50))
                .HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute("UX_Role_Name") { IsUnique=true}));
using System.ComponentModel.DataAnnotations.Schema;

[Index(IsUnique = true)]

 

[ForeignKey(nameof(SchoolId))]

 

相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2022-01-26
  • 2021-09-04
  • 2022-02-09
  • 2021-12-25
猜你喜欢
  • 2022-12-23
  • 2021-06-23
  • 2021-12-10
  • 2021-09-20
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案