public static void InitDbContext(ModelBuilder modelBuilder) { modelBuilder.Ignore <User>().Ignore <Group>().Ignore <DevicePlatform>(); LoginDbContext.InitDbContext(modelBuilder, false); DeviceDbContext.InitDbContext(modelBuilder, false); modelBuilder.Entity <LoginDevices>().HasOne(x => x.LdLogin); modelBuilder.Entity <LoginDevices>().HasOne(x => x.LdDevice); }
public static void InitDbContext(ModelBuilder modelBuilder) { modelBuilder.Ignore <DevicePlatform>().Ignore <User>(); PolicyDbContext.InitDbContext(modelBuilder, false); LoginDbContext.InitDbContext(modelBuilder, false); GroupDbContext.InitDbContext(modelBuilder); modelBuilder.Entity <PolicySet>().HasOne(x => x.PolicySetPolicy); modelBuilder.Entity <PolicySet>().HasOne(x => x.UserLogin); modelBuilder.Entity <PolicySet>().HasOne(x => x.PolicySetGroup); }