public IDtoResult HandleUpdate(UpdateLancheCommand command) { var lanche = _repository.GetById(command.Id); lanche.Update(command); _repository.Update(lanche); return(lanche.ToDto()); }
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)); } }
public void Update(UpdateLancheCommand command) { this.Nome = command.Nome; this.Valor = command.Valor; }