예제 #1
0
        public async Task <IHttpActionResult> UpdateAsync([FromBody] PedidoViewModel entity, [FromUri] int id)
        {
            var retClient = await _IPedidoAppService.GetByIdAsync(id);

            if (retClient == null)
            {
                return(NotFound());
            }
            else
            {
                await _IPedidoAppService.UpdateAsync(entity, id);

                return(Ok(entity));
            }
        }
예제 #2
0
        public async Task <IHttpActionResult> Put(int id, [FromBody] PedidoViewModel input)
        {
            await _serviceBase.UpdateAsync(input, id);

            return(Ok(input));
        }