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

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

@@ -0,0 +1,10 @@
using skydiveLogs_api.Domain;
using System.Collections.Generic;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IGearRepository : IRepository<Gear>
{
IEnumerable<Gear> GetAll(User connectedUser);
}
}

View File

@@ -0,0 +1,10 @@
using skydiveLogs_api.Domain;
using System.Collections.Generic;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IJumpRepository : IRepository<Jump>
{
IEnumerable<Jump> GetAll(User user);
}
}

View File

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

View File

@@ -0,0 +1,15 @@
using System.Collections.Generic;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IRepository<T>
{
IEnumerable<T> GetAll();
T GetById(int id);
bool Update(T updated);
bool Add(T newEntity);
}
}

View File

@@ -0,0 +1,11 @@
using System.Collections.Generic;
using skydiveLogs_api.Domain;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IUserImageRepository : IRepository<UserImage>
{
IEnumerable<UserImage> GetAll(User user);
}
}

View File

@@ -0,0 +1,10 @@
using skydiveLogs_api.Domain;
namespace skydiveLogs_api.DomainService.Repositories
{
public interface IUserRepository : IRepository<User>
{
User GetByLogin(string login, string password);
}
}

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>