mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Restructure project
This commit is contained in:
12
Service/Service.Core/Service.Core.csproj
Normal file
12
Service/Service.Core/Service.Core.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>BusinessLayer</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Repository\Repository.Core\Repository.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
10
Service/Service.Core/Services/IUserService.cs
Normal file
10
Service/Service.Core/Services/IUserService.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using DataAccessLayer.Entities;
|
||||
|
||||
namespace BusinessLayer.Services
|
||||
{
|
||||
public interface IUserService
|
||||
{
|
||||
Task<IEnumerable<UserAccount>> GetAllAsync(int? limit = null, int? offset = null);
|
||||
Task<UserAccount?> GetByIdAsync(Guid id);
|
||||
}
|
||||
}
|
||||
18
Service/Service.Core/Services/UserService.cs
Normal file
18
Service/Service.Core/Services/UserService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using DataAccessLayer.Entities;
|
||||
using DataAccessLayer.Repositories;
|
||||
|
||||
namespace BusinessLayer.Services
|
||||
{
|
||||
public class UserService(IUserAccountRepository repository) : IUserService
|
||||
{
|
||||
public async Task<IEnumerable<UserAccount>> GetAllAsync(int? limit = null, int? offset = null)
|
||||
{
|
||||
return await repository.GetAll(limit, offset);
|
||||
}
|
||||
|
||||
public async Task<UserAccount?> GetByIdAsync(Guid id)
|
||||
{
|
||||
return await repository.GetById(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user