public Task Handle(UpdateProspectCommand notification, CancellationToken cancellationToken) { notification.FillEntities(); if (notification.Invalid) { NotifyValidationErrors(notification); return(Task.CompletedTask); } prospectRepository.Update(notification.Prospect); if (Commit()) { return(Task.CompletedTask); } else { _bus.RaiseEvent(new DomainNotification(notification.MessageType, "Não foi possivel alterar cliente.")); return(Task.CompletedTask); } }
public override Prospect CommandToEntity(ProspectUpdateCommand command, Prospect entity) { _prospectRepository.Update(command.ToEntity(_prospectRepository.ById(command.ID))); return(command.ToEntity(entity)); }
public virtual void updateProspect(Prospect prospect) { prospectRepository.Update(prospect); System.Diagnostics.Debug.WriteLine("3 Prospect Service the update lat long is " + prospect.CorrectedLatitude + " " + prospect.CorrectedLongitude); }