添加项目文件。

This commit is contained in:
liming 蔡
2026-07-14 13:55:17 +08:00
parent 63759495f2
commit 8bbdf78731
335 changed files with 81415 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
using JY.DAL.Repository;
using JY.DAL.Service;
using JY.Model;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JY.DAL
{
public static class IocConfig
{
public static ServiceProvider Provider { get; private set; }
public static void Initialize()
{
var services = new ServiceCollection();
//services.AddScoped(typeof(IRepository<>), typeof(Repository<>));
services.AddScoped(typeof(IRepository<>), typeof(Repository<>));
services.AddScoped<IRepository<BlankingData>, Repository<BlankingData>>();
services.AddScoped<IAlarmDataService, AlarmDataService>();
services.AddScoped<IBlankingDataService, BlankingDataService>();
services.AddScoped<IFeedingDataService, FeedingDataService>();
Provider = services.BuildServiceProvider();
}
}
}