feat:框架基础设施搭建

This commit is contained in:
橙子
2023-04-12 22:52:09 +08:00
parent 5efdffcda8
commit 18696ec542
572 changed files with 26077 additions and 25 deletions

View File

@@ -0,0 +1,19 @@
using Microsoft.Extensions.DependencyInjection;
namespace Yi.Framework.Infrastructure.Sqlsugar
{
/// <summary>
/// 这一块,需要做成上下文对象,会进行重构
/// </summary>
public static class SqlsugarExtensions
{
//使用上下文对象
public static void AddDbSqlsugarContextServer(this IServiceCollection services)
{
services.AddSingleton(x => x.GetRequiredService<SqlSugarDbContext>().SqlSugarClient);
services.AddSingleton<SqlSugarDbContext>();
}
}
}