public async Task <GroupResponseModel> CreateNewGroupAsync(NewGroupRequestModel newGroup) { var newGroupEntity = _mapper.Map <NewGroupRequestModel, GroupEntity>(newGroup); newGroupEntity.Members = new List <int> { newGroup.CreatedUserId }; return(_mapper.Map <GroupEntity, GroupResponseModel>(await _groupRepository.CreateAsync(newGroupEntity))); }
public async Task <ActionResult <GroupResponseModel> > CreateGroupAsync([FromBody] NewGroupRequestModel newGroup) { return(Ok(await _groupManager.CreateNewGroupAsync(newGroup))); }