public HttpResponseMessage Delete(string id) { try { var result = context.Delete(id); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (Exception e) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, e.Message)); } }
// DELETE: odata/Roles(5) public IHttpActionResult Delete([FromODataUri] string key) { db.Delete(key); try { db.SaveToDb(); return(Ok()); } catch (Exception) { return(NotFound()); } }
public Role Delete(Role role) { return(db.Delete(role)); }
public void Delete(int Id) { objDB.Delete(Id); }
public void TestDeleteRole() { Assert.AreEqual(db.Delete(testRole), null); // fix later TODO }
/// <summary> /// </summary> /// <param name="rolesId"></param> /// <returns></returns> public bool Delete(string roleIds) { return(_roleDB.Delete(roleIds)); }