Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public override Prospect CommandToEntity(ProspectUpdateCommand command, Prospect entity)
 {
     _prospectRepository.Update(command.ToEntity(_prospectRepository.ById(command.ID)));
     return(command.ToEntity(entity));
 }
Exemplo n.º 3
0
 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);
 }