public ActionResult Delete(int id) { AccountClient client = new AccountClient(); client.Delete(id); return(RedirectToAction("Index")); }
private void btnDelete_Click(object sender, EventArgs e) { int userId = Int32.Parse(txtId.Text); using (var context = new BookLotEntities()) { User userToDelete = new User() { Id = userId }; AccountClient accountClient = new AccountClient(); accountClient.Delete(userToDelete); } }
/// <summary> /// Delets user with given id. /// </summary> /// <param name="id">User id.</param> /// <returns>Returns true if user deletion was successfull, false otherwise.</returns> public ApiResult <bool> Delete(int id) { return(_client.Delete <bool>($"{_client.ResourceUrl}/Users/" + id)); }
/// <summary> /// Deletes agenda's logo. /// </summary> /// <returns><c>true</c>.</returns> public ApiResult <bool> DeleteLogo() { return(_client.Delete <bool>(LogoUrl)); }