31 lines
737 B
C#
31 lines
737 B
C#
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);
|
|
}
|
|
}
|
|
}
|