internal void DeclineInvitation(int invitationId) { var currentInvitation = Ensure.Any.IsNotNull(Invitations.Find(current => current.Id == invitationId)); if (currentInvitation.Status != InvitationStatus.InProgress) { throw new InvitationAlreadyChangedException(invitationId); } currentInvitation.Status = InvitationStatus.Declined; }
internal Invitation GetInvitation(int invitationId) { return(Ensure.Any.IsNotNull(Invitations.Find(current => current.Id == invitationId))); }