public async Task <IHttpActionResult> Puttbl_DarussalamMobileUser(int id, tbl_DarussalamMobileUser tbl_DarussalamMobileUser) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tbl_DarussalamMobileUser.Id) { return(BadRequest()); } db.Entry(tbl_DarussalamMobileUser).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!tbl_DarussalamMobileUserExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> Gettbl_DarussalamMobileUser(int id) { tbl_DarussalamMobileUser tbl_DarussalamMobileUser = await db.tbl_DarussalamMobileUser.FindAsync(id); if (tbl_DarussalamMobileUser == null) { return(NotFound()); } return(Ok(tbl_DarussalamMobileUser)); }
public IHttpActionResult Gettbl_DarussalamMobileUser(int id) { tbl_DarussalamMobileUser tbl_DarussalamMobileUser = db.tbl_DarussalamMobileUser.Find(id); if (tbl_DarussalamMobileUser == null) { return(NotFound()); } return(Ok(tbl_DarussalamMobileUser)); }
public async Task <IHttpActionResult> Posttbl_DarussalamMobileUser(tbl_DarussalamMobileUser tbl_DarussalamMobileUser) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.tbl_DarussalamMobileUser.Add(tbl_DarussalamMobileUser); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = tbl_DarussalamMobileUser.Id }, tbl_DarussalamMobileUser)); }
public async Task <IHttpActionResult> Deletetbl_DarussalamMobileUser(int id) { tbl_DarussalamMobileUser tbl_DarussalamMobileUser = await db.tbl_DarussalamMobileUser.FindAsync(id); if (tbl_DarussalamMobileUser == null) { return(NotFound()); } db.tbl_DarussalamMobileUser.Remove(tbl_DarussalamMobileUser); await db.SaveChangesAsync(); return(Ok(tbl_DarussalamMobileUser)); }
public IHttpActionResult Deletetbl_DarussalamMobileUser(int id) { tbl_DarussalamMobileUser tbl_DarussalamMobileUser = db.tbl_DarussalamMobileUser.Find(id); if (tbl_DarussalamMobileUser == null) { return(NotFound()); } db.tbl_DarussalamMobileUser.Remove(tbl_DarussalamMobileUser); db.SaveChanges(); return(Ok(tbl_DarussalamMobileUser)); }