First commit

This commit is contained in:
2025-09-26 17:32:32 +02:00
commit 6c5579809d
14 changed files with 417 additions and 0 deletions

9
Logic/IUserService.cs Normal file
View File

@@ -0,0 +1,9 @@
using Models;
namespace Logic;
public interface IUserService
{
public void Create(string username, string email, string password);
public User? Read();
}

13
Logic/Logic.csproj Normal file
View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../Repository/Repository.csproj" />
</ItemGroup>
</Project>

18
Logic/UserService.cs Normal file
View File

@@ -0,0 +1,18 @@
using Models;
using Repository;
namespace Logic;
public class UserService : IUserService
{
private IRepository repository;
public User? Read()
{
return repository.Read();
}
public void Create(string username, string email, string password)
{
repository.Write(new User(username, email, password));
}
}