Moved source to subfolder
This commit is contained in:
13
src/Logic/IPasswordStoreService.cs
Normal file
13
src/Logic/IPasswordStoreService.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Models;
|
||||
|
||||
namespace Logic;
|
||||
|
||||
public interface IPasswordStoreService
|
||||
{
|
||||
IEnumerable<PasswordStore> GetAll();
|
||||
PasswordStore Get(uint ID);
|
||||
void Delete(uint ID);
|
||||
void Delete(PasswordStore item);
|
||||
void Create(PasswordStore item);
|
||||
void Edit(uint ID, PasswordStore newItem);
|
||||
}
|
||||
14
src/Logic/Logic.csproj
Normal file
14
src/Logic/Logic.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../Models/Models.csproj" />
|
||||
<ProjectReference Include="../Repository/Repository.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
39
src/Logic/PasswordStoreService.cs
Normal file
39
src/Logic/PasswordStoreService.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Models;
|
||||
using Repository;
|
||||
|
||||
namespace Logic;
|
||||
|
||||
public class PasswordStoreService : IPasswordStoreService
|
||||
{
|
||||
private readonly IRepository repository;
|
||||
|
||||
public void Create(PasswordStore item)
|
||||
{
|
||||
Create(item);
|
||||
}
|
||||
|
||||
public void Delete(uint ID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Delete(PasswordStore item)
|
||||
{
|
||||
Delete(item.ID);
|
||||
}
|
||||
|
||||
public void Edit(uint ID, PasswordStore newItem)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public PasswordStore Get(uint ID)
|
||||
{
|
||||
return repository.Get(ID);
|
||||
}
|
||||
|
||||
public IEnumerable<PasswordStore> GetAll()
|
||||
{
|
||||
return (IEnumerable<PasswordStore>)repository.GetAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user