Add draft impl for Business stack and IoC
This commit is contained in:
33
Back/skydiveLogs-api.Ioc/IocService.cs
Normal file
33
Back/skydiveLogs-api.Ioc/IocService.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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<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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user