public async Task <TagSessionResponse> AssignTagSessionAsync(int tagId, int sessionId) { try { await _tagSessionRepository.AssignTagSessionAsync(tagId, sessionId); await _unitOfWork.CompleteAsync(); TagSession tagSession = await _tagSessionRepository.FindByTagIdAndSessionId(tagId, sessionId); return(new TagSessionResponse(tagSession)); } catch (Exception ex) { return(new TagSessionResponse($"An error ocurred while assigning tag to session:{ex.Message}")); } }