public async Task <IHttpActionResult> Putusers_qualify(int id, users_qualify users_qualify) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != users_qualify.id) { return(BadRequest()); } db.Entry(users_qualify).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!users_qualifyExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> Getusers_qualify(int id) { users_qualify users_qualify = await db.users_qualify.FindAsync(id); if (users_qualify == null) { return(NotFound()); } return(Ok(users_qualify)); }
public async Task <IHttpActionResult> Postusers_qualify(users_qualify users_qualify) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.users_qualify.Add(users_qualify); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = users_qualify.id }, users_qualify)); }
public async Task <IHttpActionResult> Deleteusers_qualify(int id) { users_qualify users_qualify = await db.users_qualify.FindAsync(id); if (users_qualify == null) { return(NotFound()); } db.users_qualify.Remove(users_qualify); await db.SaveChangesAsync(); return(Ok(users_qualify)); }