Пример #1
0
        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));
        }
Пример #2
0
        public async Task <ObjectResult> CreateComandaAsync([FromBody] GeneralComandaRequest request)
        {
            Comanda result = await _comandaServices.ComandaRepository.CreateAsync(request.ToDTO());

            await _comandaServices.CommitChanges();

            return(Ok(result));
        }