public async Task <IHttpActionResult> PutCPGFD_ErrorExceptions(int id, CPGFD_ErrorExceptions cPGFD_ErrorExceptions)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetCPGFD_ErrorExceptions(int id)
        {
            CPGFD_ErrorExceptions cPGFD_ErrorExceptions = await db.CPGFD_ErrorExceptions.FindAsync(id);

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

            return(Ok(cPGFD_ErrorExceptions));
        }
        public async Task <IHttpActionResult> PostCPGFD_ErrorExceptions(CPGFD_ErrorExceptions cPGFD_ErrorExceptions)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.CPGFD_ErrorExceptions.Add(cPGFD_ErrorExceptions);
            await db.SaveChangesAsync();

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

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

            db.CPGFD_ErrorExceptions.Remove(cPGFD_ErrorExceptions);
            await db.SaveChangesAsync();

            return(Ok(cPGFD_ErrorExceptions));
        }