public async Task <IActionResult> PutCuentaContable(int id, CuentaContable cuentaContable)
        {
            if (id != cuentaContable.Id)
            {
                return(BadRequest());
            }

            _context.Entry(cuentaContable).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CuentaContableExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> PutMoneda(int id, Moneda moneda)
        {
            if (id != moneda.Id)
            {
                return(BadRequest());
            }

            _context.Entry(moneda).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MonedaExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }