コード例 #1
0
        public async Task <ActionResult <Guid> > Put(Guid guid, [FromBody] PromocionViewModel pr)
        {
            var p = await _promocionService.GetByGuidAsync(guid);

            if (p == null)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                await _promocionService.Update(guid, pr);
            }
            else
            {
                return(BadRequest());
            }

            return(Ok(pr.Id));
        }
コード例 #2
0
 public bool UpdatePromocion(Promocion datos)
 {
     return(_promocionService.Update(datos));
 }