demp_with_asp/domain/GroupUseCase.cs

20 lines
501 B
C#
Raw Normal View History

2024-11-05 21:46:20 +00:00
using Data.Models;
using Data.Repository;
using domain.Models.RequestModels;
namespace domain;
public class GroupUseCase
{
private readonly IGroupRepository _repository;
public GroupUseCase(IGroupRepository repository) {
_repository = repository;
}
public void addGroup(GroupAddRequest groupAddRequest) {
GroupLocalEntity groupLocalEntity = new GroupLocalEntity { Name = groupAddRequest.Name };
_repository.AddGroup(groupLocalEntity);
}
}