Top 20 NuGet Packages depending on IdHelper
Total dependencies: 6
.NET Generate Unique ID Based On SnowflakeId And Zookeeper
sqlsugar和EFcore读写分离
1.services.AddDbContext<OpenDbContext>(options => options.UseMySql(Configuration["ConnectionStrings:MySQL"]));
2. services.AddSqlSugarService(() =>
{
return new BaseQueryConfig
{
ConnectionString = Configuration["ConnectionStrings:MySQL"],
...
只连接sqlsugar数据库
services.AddSqlSugarService(() =>
{
return new BaseQueryConfig
{
ConnectionString = connection,
DbType = SqlSugar.DbType.MySql
};
});
只是包含EFCore公共Base类
1.Statrup的ConfigureServices方法添加services.AddAutoGenerationId();
2.继承:IdentityEntity、IdentityOperatorEntity、IdentityOperatorStatusEntity
3.模型配置继承:EntityTypeConfigurationIdentity、EntityTypeConfigurationIdentityOperator、EntityTypeConfigurationIdentityOperatorStatus
常用调用类