RoleMap.cs 620 B

1234567891011121314151617181920212223242526
  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. HasMany(r => r.Functions)
  18. .WithMany()
  19. .Map(m => m.ToTable("RoleFunctions"));
  20. }
  21. }
  22. }