Task done
This commit is contained in:
@@ -6,13 +6,19 @@ namespace Logic;
|
||||
public class UserService : IUserService
|
||||
{
|
||||
private IRepository repository;
|
||||
|
||||
public UserService(IRepository repository)
|
||||
{
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
public User? Read()
|
||||
{
|
||||
return repository.Read();
|
||||
}
|
||||
|
||||
public void Create(string username, string email, string password)
|
||||
public int Create(string username, string email, string password)
|
||||
{
|
||||
repository.Write(new User(username, email, password));
|
||||
return repository.Write(new User(username, email, password));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user