public async Task <ObjectResult> UpdateComandaAsync([FromBody] GeneralComandaRequest request, [FromRoute] int id) { Comanda result = _comandaServices.ComandaRepository.Update(request.ToDTO(id)); await _comandaServices.CommitChanges(); return(Ok(result)); }
public async Task <ObjectResult> CreateComandaAsync([FromBody] GeneralComandaRequest request) { Comanda result = await _comandaServices.ComandaRepository.CreateAsync(request.ToDTO()); await _comandaServices.CommitChanges(); return(Ok(result)); }