presence/Demo/Domain/UseCase/GroupUseCase.cs

31 lines
737 B
C#
Raw Permalink Normal View History

2024-10-18 11:46:21 +00:00
using Demo.Data.Repository;
using Demo.domain.Models;
namespace Demo.Domain.UseCase
{
public class GroupUseCase
{
private readonly GroupRepositoryImpl _repositoryGroupImpl;
public GroupUseCase(GroupRepositoryImpl repositoryGroupImpl)
{
_repositoryGroupImpl = repositoryGroupImpl;
}
public List<GroupLocalEntity> GetAllGroups()
{
return _repositoryGroupImpl.GetAllGroups();
}
public void AddGroup(int id, string name)
{
_repositoryGroupImpl.AddGroup(id, name);
}
public void UpdateGroup(int id, string newName)
{
_repositoryGroupImpl.UpdateGroup(id, newName);
}
}
}