2021-03-31 15:55:27 +08:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Sample.SqlServer3x.Domain.Maps;
|
2021-08-25 20:58:19 +08:00
|
|
|
|
using ShardingCore.Core.VirtualRoutes.RouteTails.Abstractions;
|
2021-08-20 23:10:34 +08:00
|
|
|
|
using ShardingCore.Sharding.Abstractions;
|
2021-03-31 15:55:27 +08:00
|
|
|
|
|
|
|
|
|
namespace Sample.SqlServer3x
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* @Author: xjm
|
|
|
|
|
* @Description:
|
|
|
|
|
* @Date: 2021/3/31 15:28:11
|
|
|
|
|
* @Ver: 1.0
|
|
|
|
|
* @Email: 326308290@qq.com
|
|
|
|
|
*/
|
|
|
|
|
public class DefaultDbContext : DbContext, IShardingTableDbContext
|
|
|
|
|
{
|
|
|
|
|
public DefaultDbContext(DbContextOptions<DefaultDbContext> options) : base(options)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
|
modelBuilder.ApplyConfiguration(new SysUserModMap());
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-22 16:43:26 +08:00
|
|
|
|
public IRouteTail RouteTail { get; set; }
|
2021-03-31 15:55:27 +08:00
|
|
|
|
}
|
|
|
|
|
}
|