public IHttpActionResult PuttblM_User_data(int id, tblM_User_data tblM_User_data) { if (id != tblM_User_data.UserId) { return(BadRequest()); } db.Entry(tblM_User_data).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!tblM_User_dataExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PosttblM_User_data(tblM_User_data tblM_User_data) { db.tblM_User_data.Add(tblM_User_data); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = tblM_User_data.UserId }, tblM_User_data)); }
public IHttpActionResult GettblM_User_data(int id) { tblM_User_data tblM_User_data = db.tblM_User_data.Find(id); if (tblM_User_data == null) { return(NotFound()); } return(Ok(tblM_User_data)); }
public IHttpActionResult DeletetblM_User_data(int id) { tblM_User_data tblM_User_data = db.tblM_User_data.Find(id); if (tblM_User_data == null) { return(NotFound()); } db.tblM_User_data.Remove(tblM_User_data); db.SaveChanges(); return(Ok(tblM_User_data)); }