private bool MeetupIsValid(Meetup meetup) { if (meetup.IsValid()) { return(true); } NotificarValidacoesErro(meetup.ValidationResult); return(false); }
public void Handle(RegisterMeetupCommand message) { var meetup = new Meetup( message.Name, message.Description, message.DateStart, message.DateEnd, message.Free, message.Price, message.BusinessName ); if (!meetup.IsValid()) { NotitifyErrorValidations(meetup.ValidationResult); return; } //Add others validations //Persistence _meetupRepository.Add(meetup); }