예제 #1
0
        public IDtoResult HandleUpdate(UpdateLancheCommand command)
        {
            var lanche = _repository.GetById(command.Id);

            lanche.Update(command);
            _repository.Update(lanche);

            return(lanche.ToDto());
        }
예제 #2
0
 public async Task <IActionResult> Put([FromBody] UpdateLancheCommand command)
 {
     try
     {
         var Result = _handler.HandleUpdate(command);
         return(await Response(Result));
     }
     catch (Exception ex)
     {
         return(await base.Errors(ex));
     }
 }
예제 #3
0
 public void Update(UpdateLancheCommand command)
 {
     this.Nome  = command.Nome;
     this.Valor = command.Valor;
 }