slarny4/Demo1/Domain/UseCase/UserUseCase.cs
atabidze105 ad36f40a57 init
2024-10-24 11:50:32 +03:00

42 lines
941 B
C#

using System;
using System.Collections.Generic;
using AttendanceApp.Data.Repository;
using AttendanceApp.Domain.Models;
namespace AttendanceApp.Domain.UseCases
{
public class UserUseCase
{
private readonly IUserRepository _userRepository;
public UserUseCase(IUserRepository userRepository)
{
_userRepository = userRepository;
}
public IEnumerable<User> GetAllUsers()
{
return _userRepository.GetAllUsers();
}
public User GetUserById(Guid id)
{
return _userRepository.GetUserById(id);
}
public void AddUser(User user)
{
_userRepository.AddUser(user);
}
public void UpdateUser(User user)
{
_userRepository.UpdateUser(user);
}
public void DeleteUser(Guid id)
{
_userRepository.DeleteUser(id);
}
}
}