public async Task <IHttpActionResult> PutCPGFD_ErrorMsg(int id, CPGFD_ErrorMsg cPGFD_ErrorMsg)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetCPGFD_ErrorMsg(int id)
        {
            CPGFD_ErrorMsg cPGFD_ErrorMsg = await db.CPGFD_ErrorMsg.FindAsync(id);

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

            return(Ok(cPGFD_ErrorMsg));
        }
        public async Task <IHttpActionResult> PostCPGFD_ErrorMsg(CPGFD_ErrorMsg cPGFD_ErrorMsg)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.CPGFD_ErrorMsg.Add(cPGFD_ErrorMsg);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = cPGFD_ErrorMsg.ID }, cPGFD_ErrorMsg));
        }
        public async Task <IHttpActionResult> DeleteCPGFD_ErrorMsg(int id)
        {
            CPGFD_ErrorMsg cPGFD_ErrorMsg = await db.CPGFD_ErrorMsg.FindAsync(id);

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

            db.CPGFD_ErrorMsg.Remove(cPGFD_ErrorMsg);
            await db.SaveChangesAsync();

            return(Ok(cPGFD_ErrorMsg));
        }