public IHttpActionResult PutExercise_Plan_Type(int id, Exercise_Plan_Type exercise_Plan_Type)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetExercise_Plan_Type(int id)
        {
            Exercise_Plan_Type exercise_Plan_Type = db.Exercise_Plan_Type.Find(id);

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

            return(Ok(exercise_Plan_Type));
        }
        public IHttpActionResult PostExercise_Plan_Type(Exercise_Plan_Type exercise_Plan_Type)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Exercise_Plan_Type.Add(exercise_Plan_Type);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = exercise_Plan_Type.Exercise_Plan_Type_ID }, exercise_Plan_Type));
        }
        public IHttpActionResult DeleteExercise_Plan_Type(int id)
        {
            Exercise_Plan_Type exercise_Plan_Type = db.Exercise_Plan_Type.Find(id);

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

            db.Exercise_Plan_Type.Remove(exercise_Plan_Type);
            db.SaveChanges();

            return(Ok(exercise_Plan_Type));
        }