IDataProvider dataProvider = DataProviderManager.GetDataProvider(DataProviderType.SqlServer);
bool isCreatedDatabase = dataProvider.ConnectionStringExistsByEFCore();
if (!isCreatedDatabase)
{
return new MessageModel<bool> { Fail = true, Msg = "当前程序中不存在数据库连接字符串", Code = 500 };
}
isCreatedDatabase = await dataProvider.DatabaseExistsByEFCoreAsync();
if (!isCreatedDatabase)
{
isCreatedDatabase = await dataProvider.InitializeDatabaseByEFCoreAsync();
}
</bool>
使用EF Core将默认数据添加到数据库230214039shopDemo用户权限服务和持久化
文件列表
230214-039shopDemo(用户、权限服务和持久化默认数据到数据库)
(预估有个461文件)
_IsIncrementalBuild
41B
Core.csproj.AssemblyReference.cache
273KB
Core.csproj.BuildWithSkipAnalyzers
0B
_IsIncrementalBuild
39B
_IsIncrementalBuild
39B
WebApi.csproj.BuildWithSkipAnalyzers
0B
Services.csproj.AssemblyReference.cache
232KB
_IsIncrementalBuild
41B
Services.csproj.BuildWithSkipAnalyzers
0B
_IsIncrementalBuild
39B
暂无评论