public void IncrementPeopleGoing(int outgoingId) { var outgoing = _outgoingRepository.GetOutgoingById(outgoingId); outgoing.ParticipantsCount++; AddEditOutgoing(outgoing); }
public bool JoinOutgoing(int outgoingId) { var outgoing = _outgoingQueryRepository.GetOutgoingById(outgoingId); if (outgoing.ParticipantsCount++ < outgoing.MaxPeople) { _outgoingCommandRepository.IncrementPeopleGoing(outgoingId); return(true); } return(false); }
public OutgoingDTO GetOutgoingById(int outgoingId) { var result = _outgoingQueryRepository.GetOutgoingById(outgoingId); return(result); }