public async Task <IHttpActionResult> PutInnerSecondaryEducations(int id, InnerSecondaryEducations innerSecondaryEducations)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetInnerSecondaryEducations(int id)
        {
            InnerSecondaryEducations innerSecondaryEducations = await db.InnerSecondaryEducations.FindAsync(id);

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

            return(Ok(innerSecondaryEducations));
        }
        public async Task <IHttpActionResult> PostInnerSecondaryEducations(InnerSecondaryEducations innerSecondaryEducations)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.InnerSecondaryEducations.Add(innerSecondaryEducations);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = innerSecondaryEducations.Id }, innerSecondaryEducations));
        }
        public async Task <IHttpActionResult> DeleteInnerSecondaryEducations(int id)
        {
            InnerSecondaryEducations innerSecondaryEducations = await db.InnerSecondaryEducations.FindAsync(id);

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

            db.InnerSecondaryEducations.Remove(innerSecondaryEducations);
            await db.SaveChangesAsync();

            return(Ok(innerSecondaryEducations));
        }