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

            db.mdSchematicProjectPaths.Add(mdSchematicProjectPath);
            await db.SaveChangesAsync();

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

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

            db.mdSchematicProjectPaths.Remove(mdSchematicProjectPath);
            await db.SaveChangesAsync();

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

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

            mdSchematicProjectPath mdSchematicProjectPath = await db.mdSchematicProjectPaths.FindAsync(key);

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

            patch.Put(mdSchematicProjectPath);

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

            return(Updated(mdSchematicProjectPath));
        }