mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-21 02:57:54 +08:00
add login service
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Model;
|
||||
|
||||
namespace OpenAuth.Infrastructure.Mapping
|
||||
{
|
||||
@@ -30,6 +31,16 @@ namespace OpenAuth.Infrastructure.Mapping
|
||||
this.Property(t => t.DepartmentId)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.HasMany(d => d.Users)
|
||||
.WithMany(u => u.Roles)
|
||||
.Map(
|
||||
m =>
|
||||
{
|
||||
m.MapLeftKey("RoleId");
|
||||
m.MapRightKey("UserId");
|
||||
m.ToTable("UserRole");
|
||||
});
|
||||
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("Role");
|
||||
|
Reference in New Issue
Block a user