public async Task <IHttpActionResult> PutOrdenos(int id, Ordenos ordenos)
        {
            OrdenosController ordenosController = this;

            if (!ordenosController.get_ModelState().get_IsValid())
            {
                return((IHttpActionResult)ordenosController.BadRequest(ordenosController.get_ModelState()));
            }
            if (id != ordenos.OrdenoId)
            {
                return((IHttpActionResult)ordenosController.BadRequest());
            }
            ((DbEntityEntry <Ordenos>)((DbContext)ordenosController.db).Entry <Ordenos>((M0)ordenos)).set_State((EntityState)16);
            try
            {
                int num = await((DbContext)ordenosController.db).SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException ex)
            {
                if (!ordenosController.OrdenosExists(id))
                {
                    return((IHttpActionResult)ordenosController.NotFound());
                }
                throw;
            }
            return((IHttpActionResult)ordenosController.StatusCode(HttpStatusCode.NoContent));
        }