Update to Onion Architecture.

This commit is contained in:
Sébastien André
2021-03-01 20:33:00 +01:00
parent e0c41131cc
commit 9341bb284e
70 changed files with 222 additions and 202 deletions

2
.gitignore vendored
View File

@@ -25,3 +25,5 @@
/Back/skydiveLogs-api/Init/caravan.jpg /Back/skydiveLogs-api/Init/caravan.jpg
/Back/skydiveLogs-api/Init/206.jpg /Back/skydiveLogs-api/Init/206.jpg
/Back/skydiveLogs-api/Data /Back/skydiveLogs-api/Data
/Back/skydiveLogs-api.DomainService/bin/Debug/net5.0
/Back/skydiveLogs-api.DomainService/obj

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -2,8 +2,8 @@
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; 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 public interface IAircraftService
{ {

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; 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 public interface IDropZoneService
{ {

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; 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 public interface IGearService
{ {

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic; namespace skydiveLogs_api.Business.Interfaces
namespace skydiveLogs_api.Business.Interface
{ {
public interface IInitDbService public interface IInitDbService
{ {

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; 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 public interface IJumpService
{ {

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; 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 public interface IJumpTypeService
{ {

View File

@@ -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 public interface IStatsService
{ {

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; 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 public interface IUserImageService
{ {

View File

@@ -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 public interface IUserService
{ {

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -1,9 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.DomainService.Repositories;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -3,9 +3,9 @@ using System.Text;
using System.IO; using System.IO;
using System; using System;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Business namespace skydiveLogs_api.Business

View File

@@ -6,8 +6,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Data.csproj" /> <ProjectReference Include="..\skydiveLogs-api.DomainService\skydiveLogs-api.DomainService.csproj" />
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" /> <ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Domain.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -3,11 +3,12 @@ using System.Linq;
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class AircraftRepository : IAircraftRepository public class AircraftRepository : IAircraftRepository
{ {

View File

@@ -3,11 +3,12 @@ using System.Linq;
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class DropZoneRepository : IDropZoneRepository public class DropZoneRepository : IDropZoneRepository
{ {

View File

@@ -1,13 +1,13 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class GearRepository : IGearRepository public class GearRepository : IGearRepository
{ {

View File

@@ -1,9 +0,0 @@
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Data.Interface
{
public interface IAircraftRepository : IRepository<Aircraft>
{
}
}

View File

@@ -1,9 +0,0 @@
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Data.Interface
{
public interface IDropZoneRepository : IRepository<DropZone>
{
}
}

View File

@@ -1,9 +0,0 @@
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Data.Interface
{
public interface IJumpTypeRepository : IRepository<JumpType>
{
}
}

View File

@@ -1,9 +1,9 @@
using LiteDB; using LiteDB;
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Data.Interface namespace skydiveLogs_api.Infrastructure.Interfaces
{ {
public interface IDataProvider public interface IDataProvider
{ {

View File

@@ -2,11 +2,12 @@
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class JumpRepository : IJumpRepository public class JumpRepository : IJumpRepository
{ {

View File

@@ -3,11 +3,12 @@ using System.Linq;
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class JumpTypeRepository : IJumpTypeRepository public class JumpTypeRepository : IJumpTypeRepository
{ {

View File

@@ -1,9 +1,10 @@
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data
namespace skydiveLogs_api.Infrastructure
{ {
public class LiteDbProvider : IDataProvider public class LiteDbProvider : IDataProvider
{ {

View File

@@ -1,13 +1,13 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class UserImageRepository : IUserImageRepository public class UserImageRepository : IUserImageRepository
{ {

View File

@@ -1,14 +1,14 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using LiteDB; using LiteDB;
using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Model; using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure.Interfaces;
namespace skydiveLogs_api.Data namespace skydiveLogs_api.Infrastructure
{ {
public class UserRepository : IUserRepository public class UserRepository : IUserRepository
{ {

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RootNamespace>skydiveLogs_api.Data</RootNamespace> <RootNamespace>skydiveLogs_api.Infrastructure</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -10,7 +10,8 @@
</ItemGroup> </ItemGroup>
<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> </ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,9 @@
using skydiveLogs_api.Domain;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IAircraftRepository : IRepository<Aircraft>
{
}
}

View File

@@ -0,0 +1,9 @@
using skydiveLogs_api.Domain;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IDropZoneRepository : IRepository<DropZone>
{
}
}

View File

@@ -1,7 +1,7 @@
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
using System.Collections.Generic; using System.Collections.Generic;
namespace skydiveLogs_api.Data.Interface namespace skydiveLogs_api.DomainService.Repositories
{ {
public interface IGearRepository : IRepository<Gear> public interface IGearRepository : IRepository<Gear>
{ {

View File

@@ -1,7 +1,7 @@
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
using System.Collections.Generic; using System.Collections.Generic;
namespace skydiveLogs_api.Data.Interface namespace skydiveLogs_api.DomainService.Repositories
{ {
public interface IJumpRepository : IRepository<Jump> public interface IJumpRepository : IRepository<Jump>
{ {

View File

@@ -0,0 +1,9 @@
using skydiveLogs_api.Domain;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IJumpTypeRepository : IRepository<JumpType>
{
}
}

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace skydiveLogs_api.Data.Interface namespace skydiveLogs_api.DomainService.Repositories
{ {
public interface IRepository<T> public interface IRepository<T>
{ {

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic; 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> public interface IUserImageRepository : IRepository<UserImage>
{ {

View File

@@ -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> public interface IUserRepository : IRepository<User>
{ {

View File

@@ -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>

View File

@@ -1,8 +1,12 @@
using System; using Microsoft.Extensions.Configuration;
using System.Linq;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; 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 namespace skydiveLogs_api.Ioc
{ {
@@ -17,26 +21,26 @@ namespace skydiveLogs_api.Ioc
public void Configure() public void Configure()
{ {
_services.AddScoped<Business.Interface.IAircraftService, Business.AircraftService>(); _services.AddScoped<IAircraftService, AircraftService>();
_services.AddScoped<Business.Interface.IGearService, Business.GearService>(); _services.AddScoped<IGearService, GearService>();
_services.AddScoped<Business.Interface.IDropZoneService, Business.DropZoneService>(); _services.AddScoped<IDropZoneService, DropZoneService>();
_services.AddScoped<Business.Interface.IJumpService, Business.JumpService>(); _services.AddScoped<IJumpService, JumpService>();
_services.AddScoped<Business.Interface.IJumpTypeService, Business.JumpTypeService>(); _services.AddScoped<IJumpTypeService, JumpTypeService>();
_services.AddScoped<Business.Interface.IStatsService, Business.StatsService>(); _services.AddScoped<IStatsService, StatsService>();
_services.AddScoped<Business.Interface.IUserService, Business.UserService>(); _services.AddScoped<IUserService, UserService>();
_services.AddScoped<Business.Interface.IUserImageService, Business.UserImageService>(); _services.AddScoped<IUserImageService, UserImageService>();
_services.AddScoped<Business.Interface.IInitDbService, Business.InitDbService>(); _services.AddScoped<IInitDbService, InitDbService>();
_services.AddScoped<Data.Interface.IAircraftRepository, Data.AircraftRepository>(); _services.AddScoped<IAircraftRepository, AircraftRepository>();
_services.AddScoped<Data.Interface.IDropZoneRepository, Data.DropZoneRepository>(); _services.AddScoped<IDropZoneRepository, DropZoneRepository>();
_services.AddScoped<Data.Interface.IJumpRepository, Data.JumpRepository>(); _services.AddScoped<IJumpRepository, JumpRepository>();
_services.AddScoped<Data.Interface.IJumpTypeRepository, Data.JumpTypeRepository>(); _services.AddScoped<IJumpTypeRepository, JumpTypeRepository>();
_services.AddScoped<Data.Interface.IGearRepository, Data.GearRepository>(); _services.AddScoped<IGearRepository, GearRepository>();
_services.AddScoped<Data.Interface.IUserRepository, Data.UserRepository>(); _services.AddScoped<IUserRepository, UserRepository>();
_services.AddScoped<Data.Interface.IUserImageRepository, Data.UserImageRepository>(); _services.AddScoped<IUserImageRepository, UserImageRepository>();
string connectionString = _configuration.GetConnectionString("DefaultConnection"); 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; private readonly IServiceCollection _services;

View File

@@ -7,7 +7,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" /> <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>
<ItemGroup> <ItemGroup>

View File

@@ -1,4 +1,4 @@
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class Aircraft public class Aircraft
{ {

View File

@@ -1,4 +1,4 @@
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class DatabaseOptions public class DatabaseOptions
{ {

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class DropZone public class DropZone
{ {

View File

@@ -1,4 +1,4 @@
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class Gear public class Gear
{ {

View File

@@ -1,6 +1,6 @@
using System; using System;
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class Jump public class Jump
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace skydiveLogs_api.Domain
using System.Collections.Generic;
using System.Text;
namespace skydiveLogs_api.Model
{ {
public class JumpType public class JumpType
{ {

View File

@@ -1,4 +1,4 @@
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class SimpleSummary public class SimpleSummary
{ {

View File

@@ -1,4 +1,4 @@
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class Statistic public class Statistic
{ {

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic; namespace skydiveLogs_api.Domain
namespace skydiveLogs_api.Model
{ {
public class User public class User
{ {

View File

@@ -1,4 +1,4 @@
namespace skydiveLogs_api.Model namespace skydiveLogs_api.Domain
{ {
public class UserImage public class UserImage
{ {

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RootNamespace>skydiveLogs_api.Model</RootNamespace> <RootNamespace>skydiveLogs_api.Domain</RootNamespace>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -1,17 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.28307.852 VisualStudioVersion = 16.0.31019.35
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api", "skydiveLogs-api\skydiveLogs-api.csproj", "{0AC70CC2-CE52-4CD9-89D6-077800574360}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api", "skydiveLogs-api\skydiveLogs-api.csproj", "{0AC70CC2-CE52-4CD9-89D6-077800574360}"
EndProject 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 EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Business", "skydiveLogs-api.Business\skydiveLogs-api.Business.csproj", "{803C3CFD-71D7-452F-848D-BF3DAF876CDF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skydiveLogs-api.Business", "skydiveLogs-api.Business\skydiveLogs-api.Business.csproj", "{803C3CFD-71D7-452F-848D-BF3DAF876CDF}"
EndProject 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 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 EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution 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}.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.ActiveCfg = Release|Any CPU
{D2ECA52D-DA50-47D4-8624-4487DE29E0C0}.Release|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using skydiveLogs_api.Model; using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Cors;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;

View File

@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using Microsoft.Extensions.Configuration;
using System; using System;
using System.Text; using System.Text;
using System.Security.Claims; using System.Security.Claims;
@@ -11,9 +10,10 @@ using Microsoft.Extensions.Options;
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Domain;
using skydiveLogs_api.Business.Interfaces;
using skydiveLogs_api.DataContract; using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model; using skydiveLogs_api.Settings;
namespace skydiveLogs_api.Controllers namespace skydiveLogs_api.Controllers

View File

@@ -1,29 +1,32 @@
using AutoMapper; using AutoMapper;
using skydiveLogs_api.Domain;
namespace skydiveLogs_api.Mapper namespace skydiveLogs_api.Mapper
{ {
public class ModelProfile : Profile public class ModelProfile : Profile
{ {
public ModelProfile() public ModelProfile()
{ {
CreateMap<DataContract.JumpReq, Model.Jump>(); CreateMap<DataContract.JumpReq, Jump>();
CreateMap<DataContract.JumpTypeReq, Model.JumpType>(); CreateMap<DataContract.JumpTypeReq, JumpType>();
CreateMap<DataContract.AircraftReq, Model.Aircraft>(); CreateMap<DataContract.AircraftReq, Aircraft>();
CreateMap<DataContract.DropZoneReq, Model.DropZone>(); CreateMap<DataContract.DropZoneReq, DropZone>();
CreateMap<DataContract.GearReq, Model.Gear>(); CreateMap<DataContract.GearReq, Gear>();
CreateMap<DataContract.UserReq, Model.User>(); CreateMap<DataContract.UserReq, User>();
CreateMap<DataContract.ImageReq, Model.UserImage>(); CreateMap<DataContract.ImageReq, UserImage>();
CreateMap<Model.Gear, DataContract.GearResp>(); CreateMap<Gear, DataContract.GearResp>();
CreateMap<Model.Jump, DataContract.JumpResp>(); CreateMap<Jump, DataContract.JumpResp>();
CreateMap<Model.JumpType ,DataContract.JumpTypeResp>(); CreateMap<JumpType ,DataContract.JumpTypeResp>();
CreateMap<Model.Aircraft ,DataContract.AircraftResp>(); CreateMap<Aircraft ,DataContract.AircraftResp>();
CreateMap<Model.DropZone ,DataContract.DropZoneResp>(); CreateMap<DropZone ,DataContract.DropZoneResp>();
CreateMap<Model.Statistic ,DataContract.StatisticResp>(); CreateMap<Statistic ,DataContract.StatisticResp>();
CreateMap<Model.User, DataContract.UserResp>(); CreateMap<User, DataContract.UserResp>();
CreateMap<Model.UserImage, DataContract.ImageResp>(); CreateMap<UserImage, DataContract.ImageResp>();
CreateMap<Model.SimpleSummary, DataContract.SimpleSummaryResp>(); CreateMap<SimpleSummary, DataContract.SimpleSummaryResp>();
} }
} }
} }

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic; namespace skydiveLogs_api.Settings
namespace skydiveLogs_api.Model
{ {
public class CorsSettings public class CorsSettings
{ {

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic; namespace skydiveLogs_api.Settings
namespace skydiveLogs_api.Model
{ {
public class JwtSettings public class JwtSettings
{ {

View File

@@ -9,11 +9,9 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using AutoMapper;
using skydiveLogs_api.Ioc; using skydiveLogs_api.Ioc;
using skydiveLogs_api.Business.Interface; using skydiveLogs_api.Settings;
using skydiveLogs_api.Model; using skydiveLogs_api.Business.Interfaces;
namespace skydiveLogs_api namespace skydiveLogs_api

View File

@@ -28,7 +28,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" /> <ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" />
<ProjectReference Include="..\skydiveLogs-api.Ioc\skydiveLogs-api.Ioc.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> </ItemGroup>
</Project> </Project>