sharding/samples/Sample.MySql/multi/MyUserRoute.cs

18 lines
441 B
C#
Raw Permalink Normal View History

using ShardingCore.Core.EntityMetadatas;
using ShardingCore.VirtualRoutes.Mods;
namespace Sample.MySql.multi;
public class MyUserRoute:AbstractSimpleShardingModKeyStringVirtualTableRoute<MyUser>
{
protected override bool EnableHintRoute => true;
public MyUserRoute() : base(1, 3)
{
}
public override void Configure(EntityMetadataTableBuilder<MyUser> builder)
{
builder.ShardingProperty(o => o.Id);
}
}