Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- builder.Entity<Project>()
- .HasMany<ApplicationUser>(x => x.Users)
- .WithMany(x => x.Projects)
- .Map(m =>
- {
- m.ToTable("UserToProject");
- m.MapLeftKey("ProjectId");
- m.MapRightKey("UserId");
- });
- builder.Entity<ApplicationUser>()
- .HasMany<ProjectTask>(x => x.ProjectTasks)
- .WithMany(x => x.Users)
- .Map(m =>
- {
- m.ToTable("UserToTask");
- m.MapLeftKey("UserId");
- m.MapRightKey("TaskId");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement