// POST: odata/mdArrangementAcLoopRows
        public async Task <IHttpActionResult> Post(mdArrangementAcLoopRow mdArrangementAcLoopRow)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.mdArrangementAcLoopRows.Add(mdArrangementAcLoopRow);
            await db.SaveChangesAsync();

            return(Created(mdArrangementAcLoopRow));
        }
        // DELETE: odata/mdArrangementAcLoopRows(5)
        public async Task <IHttpActionResult> Delete([FromODataUri] int key)
        {
            mdArrangementAcLoopRow mdArrangementAcLoopRow = await db.mdArrangementAcLoopRows.FindAsync(key);

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

            db.mdArrangementAcLoopRows.Remove(mdArrangementAcLoopRow);
            await db.SaveChangesAsync();

            return(StatusCode(HttpStatusCode.NoContent));
        }
        // PUT: odata/mdArrangementAcLoopRows(5)
        public async Task <IHttpActionResult> Put([FromODataUri] int key, Delta <mdArrangementAcLoopRow> patch)
        {
            Validate(patch.GetEntity());

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            mdArrangementAcLoopRow mdArrangementAcLoopRow = await db.mdArrangementAcLoopRows.FindAsync(key);

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

            patch.Put(mdArrangementAcLoopRow);

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!mdArrangementAcLoopRowExists(key))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Updated(mdArrangementAcLoopRow));
        }