2021-08-15 11:07:03 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-10-11 20:58:55 +08:00
|
|
|
|
using ShardingCore.Core.VirtualRoutes.TableRoutes.RouteTails.Abstractions;
|
2021-08-15 11:07:03 +08:00
|
|
|
|
using ShardingCore.Sharding;
|
2021-10-11 20:58:55 +08:00
|
|
|
|
using ShardingCore.Sharding.Abstractions;
|
2021-08-15 11:07:03 +08:00
|
|
|
|
using ShardingCore.Test50.Domain.Maps;
|
|
|
|
|
|
|
|
|
|
namespace ShardingCore.Test50
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* @Author: xjm
|
|
|
|
|
* @Description:
|
|
|
|
|
* @Date: 2021/8/15 10:21:03
|
|
|
|
|
* @Ver: 1.0
|
|
|
|
|
* @Email: 326308290@qq.com
|
|
|
|
|
*/
|
2021-10-11 20:58:55 +08:00
|
|
|
|
public class ShardingDefaultDbContext:AbstractShardingDbContext, IShardingTableDbContext
|
2021-08-15 11:07:03 +08:00
|
|
|
|
{
|
|
|
|
|
public ShardingDefaultDbContext(DbContextOptions<ShardingDefaultDbContext> options) : base(options)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
|
modelBuilder.ApplyConfiguration(new SysUserModMap());
|
|
|
|
|
modelBuilder.ApplyConfiguration(new SysUserSalaryMap());
|
|
|
|
|
}
|
2021-08-20 13:50:49 +08:00
|
|
|
|
|
2021-10-11 20:58:55 +08:00
|
|
|
|
public IRouteTail RouteTail { get; set; }
|
2021-08-15 11:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
}
|