29 lines
841 B
C#
29 lines
841 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Sample.SqlServer.Domain.Maps;
|
|
using ShardingCore.Core.VirtualRoutes.Abstractions;
|
|
using ShardingCore.DbContexts.ShardingDbContexts;
|
|
using ShardingCore.Sharding.Abstractions;
|
|
|
|
namespace Sample.SqlServer.DbContexts
|
|
{
|
|
public class DefaultTableDbContext: DbContext,IShardingTableDbContext
|
|
{
|
|
public DefaultTableDbContext(DbContextOptions<DefaultTableDbContext> options) :base(options)
|
|
{
|
|
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
modelBuilder.ApplyConfiguration(new SysUserModMap());
|
|
}
|
|
|
|
public IRouteTail RouteTail { get; set; }
|
|
}
|
|
}
|