public async Task <IHttpActionResult> PutCM_Process(int id, CM_Process cM_Process)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != cM_Process.id)
            {
                return(BadRequest());
            }

            db.Entry(cM_Process).State = EntityState.Modified;

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetCM_Process(int id)
        {
            CM_Process cM_Process = await db.CM_Process.FindAsync(id);

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

            return(Ok(cM_Process));
        }
        public async Task <IHttpActionResult> PostCM_Process(CM_Process cM_Process)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.CM_Process.Add(cM_Process);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = cM_Process.id }, cM_Process));
        }
        public async Task <IHttpActionResult> DeleteCM_Process(int id)
        {
            CM_Process cM_Process = await db.CM_Process.FindAsync(id);

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

            db.CM_Process.Remove(cM_Process);
            await db.SaveChangesAsync();

            return(Ok(cM_Process));
        }