39 lines
898 B
C#
39 lines
898 B
C#
using Demo.Data.Repository;
|
|
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Demo.Domain.UseCase
|
|
{
|
|
public class UserUseCase
|
|
{
|
|
private readonly IUserRepository _userRepository;
|
|
|
|
public UserUseCase(IUserRepository userRepository)
|
|
{
|
|
_userRepository = userRepository;
|
|
}
|
|
|
|
public IUserRepository UserRepository => _userRepository;
|
|
|
|
public IEnumerable<User> GetAllUsers()
|
|
{
|
|
return _userRepository.GetAllUsers();
|
|
}
|
|
|
|
public User GetUserById(Guid id)
|
|
{
|
|
return _userRepository.GetUserById(id);
|
|
}
|
|
|
|
public void UpdateUser(User user)
|
|
{
|
|
_userRepository.UpdateUser(user);
|
|
}
|
|
|
|
public void DeleteUser(Guid id)
|
|
{
|
|
_userRepository.DeleteUser(id);
|
|
}
|
|
}
|
|
} |