2026-07-14 13:55:17 +08:00
|
|
|
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<>));
|
2026-07-14 19:24:01 +08:00
|
|
|
//services.AddScoped<IRepository<BlankingData>, Repository<BlankingData>>();
|
2026-07-14 13:55:17 +08:00
|
|
|
|
|
|
|
|
services.AddScoped<IAlarmDataService, AlarmDataService>();
|
|
|
|
|
services.AddScoped<IBlankingDataService, BlankingDataService>();
|
|
|
|
|
services.AddScoped<IFeedingDataService, FeedingDataService>();
|
|
|
|
|
|
|
|
|
|
Provider = services.BuildServiceProvider();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|