Files
StockInfoCoreApp/StockInfoCore/StockInfoDISetup.cs

45 lines
1.5 KiB
C#

using Microsoft.Extensions.DependencyInjection;
using SqliteBackups;
using SqliteBackups.Interfaces;
using StockBL;
using StockBL.Interface;
using StockDal;
using StockDal.Interface;
using StockDAL;
using StockDAL.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StockInfoCore
{
public static class StockInfoDISetup
{
public static IServiceCollection AddDIInfo(this IServiceCollection services)
{
services.AddTransient<IBackupRepository, BackupRepository>();
services.AddTransient<IBackupRoutines, BackupRoutines>();
services.AddTransient<IStockRepository, StockRepository>();
services.AddTransient<IStockMarketRepository,StockMarketRepository>();
services.AddTransient<IPersonRepository,PersonRepository>();
services.AddTransient<IAddressRepository,AddressRepository>();
services.AddTransient<IStockPersonConnect,StockPersonConnect>();
services.AddTransient<IPersonStockFacade,PersonStockFacade>();
services.AddTransient<frmBackup>();
services.AddTransient<frmRegisterStock>();
services.AddTransient<frmEditStock>();
services.AddTransient<frmMyStocks>();
services.AddTransient<frmSelling>();
services.AddTransient<frmPerson>();
services.AddTransient<frmPersonShareConnect>();
services.AddTransient<frmInitial>();
return services;
}
}
}