using System; using System.Collections.Generic; using System.Data.Entity.ModelConfiguration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GreenTree.Nachtragsmanagement.Data.Mapping.User { public class RoleMap : EntityTypeConfiguration { public RoleMap() { ToTable("Role"); HasKey(r => r.Id); Property(r => r.Description); Property(r => r.Level); HasMany(r => r.Functions) .WithMany() .Map(m => m.ToTable("RoleFunctions")); } } }