Update to Onion Architecture.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,3 +25,5 @@
|
||||
/Back/skydiveLogs-api/Init/caravan.jpg
|
||||
/Back/skydiveLogs-api/Init/206.jpg
|
||||
/Back/skydiveLogs-api/Data
|
||||
/Back/skydiveLogs-api.DomainService/bin/Debug/net5.0
|
||||
/Back/skydiveLogs-api.DomainService/obj
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IAircraftService
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IDropZoneService
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IGearService
|
||||
{
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IInitDbService
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IJumpService
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IJumpTypeService
|
||||
{
|
||||
@@ -1,7 +1,9 @@
|
||||
using skydiveLogs_api.Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IStatsService
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IUserImageService
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
namespace skydiveLogs_api.Business.Interface
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IUserService
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Text;
|
||||
using System.IO;
|
||||
using System;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Data.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.DomainService\skydiveLogs-api.DomainService.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -3,11 +3,12 @@ using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class AircraftRepository : IAircraftRepository
|
||||
{
|
||||
|
||||
@@ -3,11 +3,12 @@ using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class DropZoneRepository : IDropZoneRepository
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class GearRepository : IGearRepository
|
||||
{
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
{
|
||||
public interface IAircraftRepository : IRepository<Aircraft>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
{
|
||||
public interface IDropZoneRepository : IRepository<DropZone>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
{
|
||||
public interface IJumpTypeRepository : IRepository<JumpType>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
namespace skydiveLogs_api.Infrastructure.Interfaces
|
||||
{
|
||||
public interface IDataProvider
|
||||
{
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class JumpRepository : IJumpRepository
|
||||
{
|
||||
|
||||
@@ -3,11 +3,12 @@ using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class JumpTypeRepository : IJumpTypeRepository
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class LiteDbProvider : IDataProvider
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class UserImageRepository : IUserImageRepository
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using skydiveLogs_api.Data.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class UserRepository : IUserRepository
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RootNamespace>skydiveLogs_api.Data</RootNamespace>
|
||||
<RootNamespace>skydiveLogs_api.Infrastructure</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -10,7 +10,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.DomainService\skydiveLogs-api.DomainService.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IAircraftRepository : IRepository<Aircraft>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IDropZoneRepository : IRepository<DropZone>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IGearRepository : IRepository<Gear>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IJumpRepository : IRepository<Jump>
|
||||
{
|
||||
@@ -0,0 +1,9 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IJumpTypeRepository : IRepository<JumpType>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IRepository<T>
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IUserImageRepository : IRepository<UserImage>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Data.Interface
|
||||
namespace skydiveLogs_api.DomainService.Repositories
|
||||
{
|
||||
public interface IUserRepository : IRepository<User>
|
||||
{
|
||||
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RootNamespace>skydiveLogs_api.DomainService</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,8 +1,12 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.Business;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Ioc
|
||||
{
|
||||
@@ -17,26 +21,26 @@ namespace skydiveLogs_api.Ioc
|
||||
|
||||
public void Configure()
|
||||
{
|
||||
_services.AddScoped<Business.Interface.IAircraftService, Business.AircraftService>();
|
||||
_services.AddScoped<Business.Interface.IGearService, Business.GearService>();
|
||||
_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<Business.Interface.IUserService, Business.UserService>();
|
||||
_services.AddScoped<Business.Interface.IUserImageService, Business.UserImageService>();
|
||||
_services.AddScoped<Business.Interface.IInitDbService, Business.InitDbService>();
|
||||
_services.AddScoped<IAircraftService, AircraftService>();
|
||||
_services.AddScoped<IGearService, GearService>();
|
||||
_services.AddScoped<IDropZoneService, DropZoneService>();
|
||||
_services.AddScoped<IJumpService, JumpService>();
|
||||
_services.AddScoped<IJumpTypeService, JumpTypeService>();
|
||||
_services.AddScoped<IStatsService, StatsService>();
|
||||
_services.AddScoped<IUserService, UserService>();
|
||||
_services.AddScoped<IUserImageService, UserImageService>();
|
||||
_services.AddScoped<IInitDbService, InitDbService>();
|
||||
|
||||
_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>();
|
||||
_services.AddScoped<Data.Interface.IUserRepository, Data.UserRepository>();
|
||||
_services.AddScoped<Data.Interface.IUserImageRepository, Data.UserImageRepository>();
|
||||
_services.AddScoped<IAircraftRepository, AircraftRepository>();
|
||||
_services.AddScoped<IDropZoneRepository, DropZoneRepository>();
|
||||
_services.AddScoped<IJumpRepository, JumpRepository>();
|
||||
_services.AddScoped<IJumpTypeRepository, JumpTypeRepository>();
|
||||
_services.AddScoped<IGearRepository, GearRepository>();
|
||||
_services.AddScoped<IUserRepository, UserRepository>();
|
||||
_services.AddScoped<IUserImageRepository, UserImageRepository>();
|
||||
|
||||
string connectionString = _configuration.GetConnectionString("DefaultConnection");
|
||||
_services.AddSingleton<Data.Interface.IDataProvider>(c => new Data.LiteDbProvider(connectionString));
|
||||
_services.AddSingleton<IDataProvider>(c => new LiteDbProvider(connectionString));
|
||||
}
|
||||
|
||||
private readonly IServiceCollection _services;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Data.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class Aircraft
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class DatabaseOptions
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class DropZone
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class Gear
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class Jump
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class JumpType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class SimpleSummary
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class Statistic
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class User
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Domain
|
||||
{
|
||||
public class UserImage
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RootNamespace>skydiveLogs_api.Model</RootNamespace>
|
||||
<RootNamespace>skydiveLogs_api.Domain</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,17 +1,19 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.852
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31019.35
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api", "skydiveLogs-api\skydiveLogs-api.csproj", "{0AC70CC2-CE52-4CD9-89D6-077800574360}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Model", "skydiveLogs-api.Model\skydiveLogs-api.Model.csproj", "{EF101C84-AE0D-4F5E-8BC5-0C55CB0B5D23}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Domain", "skydiveLogs-api.Model\skydiveLogs-api.Domain.csproj", "{EF101C84-AE0D-4F5E-8BC5-0C55CB0B5D23}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Business", "skydiveLogs-api.Business\skydiveLogs-api.Business.csproj", "{803C3CFD-71D7-452F-848D-BF3DAF876CDF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Data", "skydiveLogs-api.Data\skydiveLogs-api.Data.csproj", "{887D2F69-A9E9-46C4-A5D9-3813A2387AA2}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Infrastructure", "skydiveLogs-api.Data\skydiveLogs-api.Infrastructure.csproj", "{887D2F69-A9E9-46C4-A5D9-3813A2387AA2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skydiveLogs-api.Ioc", "skydiveLogs-api.Ioc\skydiveLogs-api.Ioc.csproj", "{D2ECA52D-DA50-47D4-8624-4487DE29E0C0}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Ioc", "skydiveLogs-api.Ioc\skydiveLogs-api.Ioc.csproj", "{D2ECA52D-DA50-47D4-8624-4487DE29E0C0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skydiveLogs-api.DomainService", "skydiveLogs-api.DomainService\skydiveLogs-api.DomainService.csproj", "{DD5640C0-14B3-4FEA-A856-2C9091404197}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -39,6 +41,10 @@ Global
|
||||
{D2ECA52D-DA50-47D4-8624-4487DE29E0C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D2ECA52D-DA50-47D4-8624-4487DE29E0C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D2ECA52D-DA50-47D4-8624-4487DE29E0C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DD5640C0-14B3-4FEA-A856-2C9091404197}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DD5640C0-14B3-4FEA-A856-2C9091404197}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DD5640C0-14B3-4FEA-A856-2C9091404197}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DD5640C0-14B3-4FEA-A856-2C9091404197}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Cors;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Security.Claims;
|
||||
@@ -11,9 +10,10 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Settings;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Mapper
|
||||
{
|
||||
public class ModelProfile : Profile
|
||||
{
|
||||
public ModelProfile()
|
||||
{
|
||||
CreateMap<DataContract.JumpReq, Model.Jump>();
|
||||
CreateMap<DataContract.JumpTypeReq, Model.JumpType>();
|
||||
CreateMap<DataContract.AircraftReq, Model.Aircraft>();
|
||||
CreateMap<DataContract.DropZoneReq, Model.DropZone>();
|
||||
CreateMap<DataContract.GearReq, Model.Gear>();
|
||||
CreateMap<DataContract.UserReq, Model.User>();
|
||||
CreateMap<DataContract.ImageReq, Model.UserImage>();
|
||||
CreateMap<DataContract.JumpReq, Jump>();
|
||||
CreateMap<DataContract.JumpTypeReq, JumpType>();
|
||||
CreateMap<DataContract.AircraftReq, Aircraft>();
|
||||
CreateMap<DataContract.DropZoneReq, DropZone>();
|
||||
CreateMap<DataContract.GearReq, Gear>();
|
||||
CreateMap<DataContract.UserReq, User>();
|
||||
CreateMap<DataContract.ImageReq, UserImage>();
|
||||
|
||||
CreateMap<Model.Gear, DataContract.GearResp>();
|
||||
CreateMap<Model.Jump, DataContract.JumpResp>();
|
||||
CreateMap<Model.JumpType ,DataContract.JumpTypeResp>();
|
||||
CreateMap<Model.Aircraft ,DataContract.AircraftResp>();
|
||||
CreateMap<Model.DropZone ,DataContract.DropZoneResp>();
|
||||
CreateMap<Model.Statistic ,DataContract.StatisticResp>();
|
||||
CreateMap<Model.User, DataContract.UserResp>();
|
||||
CreateMap<Model.UserImage, DataContract.ImageResp>();
|
||||
CreateMap<Gear, DataContract.GearResp>();
|
||||
CreateMap<Jump, DataContract.JumpResp>();
|
||||
CreateMap<JumpType ,DataContract.JumpTypeResp>();
|
||||
CreateMap<Aircraft ,DataContract.AircraftResp>();
|
||||
CreateMap<DropZone ,DataContract.DropZoneResp>();
|
||||
CreateMap<Statistic ,DataContract.StatisticResp>();
|
||||
CreateMap<User, DataContract.UserResp>();
|
||||
CreateMap<UserImage, DataContract.ImageResp>();
|
||||
|
||||
CreateMap<Model.SimpleSummary, DataContract.SimpleSummaryResp>();
|
||||
CreateMap<SimpleSummary, DataContract.SimpleSummaryResp>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Settings
|
||||
{
|
||||
public class CorsSettings
|
||||
{
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Model
|
||||
namespace skydiveLogs_api.Settings
|
||||
{
|
||||
public class JwtSettings
|
||||
{
|
||||
@@ -9,11 +9,9 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Ioc;
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.Model;
|
||||
using skydiveLogs_api.Settings;
|
||||
using skydiveLogs_api.Business.Interfaces;
|
||||
|
||||
|
||||
namespace skydiveLogs_api
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Ioc\skydiveLogs-api.Ioc.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user