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;
|
||||
}
|
||||
}
|
||||
19
Back/skydiveLogs-api.Ioc/skydiveLogs-api.Ioc.csproj
Normal file
19
Back/skydiveLogs-api.Ioc/skydiveLogs-api.Ioc.csproj
Normal file
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<RootNamespace>skydiveLogs_api.Ioc</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions">
|
||||
<HintPath>..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.dependencyinjection.abstractions\2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user