public IHttpActionResult PutChangeProgramSAS(int id, ChangeProgramSAS changeProgramSAS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ChangeProgramSASExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetChangeProgramSAS(int id)
        {
            ChangeProgramSAS changeProgramSAS = db.ChangeProgramSAS.Find(id);

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

            return(Ok(changeProgramSAS));
        }
        public IHttpActionResult PostChangeProgramSAS(ChangeProgramSAS changeProgramSAS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.ChangeProgramSAS.Add(changeProgramSAS);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = changeProgramSAS.Id }, changeProgramSAS));
        }
        public IHttpActionResult DeleteChangeProgramSAS(int id)
        {
            ChangeProgramSAS changeProgramSAS = db.ChangeProgramSAS.Find(id);

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

            db.ChangeProgramSAS.Remove(changeProgramSAS);
            db.SaveChanges();

            return(Ok(changeProgramSAS));
        }