| 1234567891011121314151617181920212223242526272829303132333435 |
- 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.CustomNumber);
- Property(u => u.Forename);
- Property(u => u.Lastname);
- Property(u => u.MailAddress);
- Property(u => u.Password);
- Ignore(u => u.CurrentRole);
- HasMany(c => c.Roles)
- .WithMany()
- .Map(m => m.ToTable("UserRoles"));
- HasMany(c => c.MailNotifications)
- .WithMany()
- .Map(m => m.ToTable("UserMailNotifications"));
- }
- }
- }
|