RoleMap.cs 666 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Entity.ModelConfiguration;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace GreenTree.Nachtragsmanagement.Data.Mapping.User
  8. {
  9. public class RoleMap : EntityTypeConfiguration<Core.Domain.User.Role>
  10. {
  11. public RoleMap()
  12. {
  13. ToTable("Role");
  14. HasKey(r => r.Id);
  15. Property(r => r.Description);
  16. Property(r => r.Level);
  17. Property(r => r.SeeOnlyAssigned);
  18. HasMany(r => r.Functions)
  19. .WithMany()
  20. .Map(m => m.ToTable("RoleFunctions"));
  21. }
  22. }
  23. }