public async Task <ActionResult <OrdenesContado> > PostOrdenesContado(OrdenesContado ordenesContado)
        {
            _context.OrdenesContado.Add(ordenesContado);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetOrdenesContado", new { id = ordenesContado.Id }, ordenesContado));
        }
        public async Task <IActionResult> PutOrdenesContado(int id, OrdenesContado ordenesContado)
        {
            if (id != ordenesContado.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }