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

41 lines
956 B
C#

using System.Collections.Generic;
using AttendanceApp.Data.Repository;
using AttendanceApp.Domain.Models;
namespace AttendanceApp.Domain.UseCases
{
public class GroupUseCase
{
private readonly IGroupRepository _groupRepository;
public GroupUseCase(IGroupRepository groupRepository)
{
_groupRepository = groupRepository;
}
public IEnumerable<Group> GetAllGroups()
{
return _groupRepository.GetAllGroups();
}
public Group GetGroupById(int id)
{
return _groupRepository.GetGroupById(id);
}
public void AddGroup(Group group)
{
_groupRepository.AddGroup(group);
}
public void UpdateGroup(Group group)
{
_groupRepository.UpdateGroup(group);
}
public void DeleteGroup(int id)
{
_groupRepository.DeleteGroup(id);
}
}
}