35 lines
1.6 KiB
C#
35 lines
1.6 KiB
C#
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace skydiveLogs_api.Ioc
|
|
{
|
|
public class IocService
|
|
{
|
|
public IocService(IServiceCollection services)
|
|
{
|
|
_services = services;
|
|
}
|
|
|
|
public void Configure()
|
|
{
|
|
//services.AddSingleton<IConfigurationRoot>(Configuration);
|
|
//_services.AddSingleton<Services.IGroupService, Services.GroupService>();
|
|
//_services.AddSingleton<Services.IUserService, Services.UserService>();
|
|
//_services.AddSingleton<Services.IPermissionService, Services.PermissionService>();
|
|
|
|
_services.AddScoped<Business.Interface.IAircraftService, Business.AircraftService>();
|
|
_services.AddScoped<Business.Interface.IDropZoneService, Business.DropZoneService>();
|
|
_services.AddScoped<Business.Interface.IJumpService, Business.JumpService>();
|
|
_services.AddScoped<Business.Interface.IJumpTypeService, Business.JumpTypeService>();
|
|
_services.AddScoped<Business.Interface.IStatsService, Business.StatsService>();
|
|
|
|
_services.AddScoped<Data.Interface.IAircraftRepository, Data.AircraftRepository>();
|
|
_services.AddScoped<Data.Interface.IDropZoneRepository, Data.DropZoneRepository>();
|
|
_services.AddScoped<Data.Interface.IJumpRepository, Data.JumpRepository>();
|
|
_services.AddScoped<Data.Interface.IJumpTypeRepository, Data.JumpTypeRepository>();
|
|
_services.AddScoped<Data.Interface.IGearRepository, Data.GearRepository>();
|
|
}
|
|
|
|
private readonly IServiceCollection _services;
|
|
}
|
|
}
|