コード例 #1
0
        public async Task <IHttpActionResult> UpdateAsync([FromBody] PedidoItemViewModel entity, [FromUri] int id)
        {
            var retClient = await _IPedidoItemAppService.GetByIdAsync(id);

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

                return(Ok(entity));
            }
        }
コード例 #2
0
        public async Task <IHttpActionResult> Put(int id, [FromBody] PedidoItemViewModel input)
        {
            await _serviceBase.UpdateAsync(input, id);

            return(Ok(input));
        }