Ejemplo n.º 1
0
        public async Task AcceptInvitationAsync(int inviteId, string receiverId)
        {
            var result = await _userEventRepository.AcceptInvitationAsync(inviteId, receiverId);

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

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

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