| 12345678910111213141516171819202122232425262728 |
- 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 UserMap : EntityTypeConfiguration<Core.Domain.User.User>
- {
- public UserMap()
- {
- ToTable("User");
- HasKey(u => u.Id);
- Property(u => u.CustomId);
- Property(u => u.Forename);
- Property(u => u.Lastname);
- Property(u => u.MailAddress);
- HasMany(c => c.Roles)
- .WithMany()
- .Map(m => m.ToTable("UserRoles"));
- }
- }
- }
|