Ejemplo n.º 1
0
        public async Task AddInviteEmailAsync(string senderId, string email, int groupId)
        {
            var result = await _userGroupRepository.AddInviteEmailAsync(groupId, senderId, email);

            switch (result.Status)
            {
            case RepositoryStatus.Created:
                return;

            case RepositoryStatus.NotFound:
                throw new ServiceException(ErrorCodes.EntityNotFound);

            case RepositoryStatus.BadRequest:
                throw new ServiceException(ErrorCodes.BadRequest);

            default: throw new ServiceException(ErrorCodes.DatabaseError);
            }
        }