public ActionResult DeleteConfirmed(int id) { Post post = postManager.Find(x => x.Id == id); postManager.Delete(post); return(RedirectToAction("Index")); }
public IActionResult Delete(int id) { var post = _postManager.GetPost(id); _postManager.Delete(post); return(RedirectToAction(nameof(Index))); }
public ServiceResult Delete(Post s) { if (s == null || string.IsNullOrWhiteSpace(s.UUID)) { return(ServiceResponse.Error("Invalid account was sent.")); } PostManager postManager = new PostManager(Globals.DBConnectionKey, this.GetAuthToken(Request)); return(postManager.Delete(s)); }
public ServiceResult Delete(string uuid) { if (string.IsNullOrWhiteSpace(uuid)) { return(ServiceResponse.Error("Invalid id was sent.")); } PostManager postManager = new PostManager(Globals.DBConnectionKey, this.GetAuthToken(Request)); var res = postManager.Get(uuid); if (res.Code != 200) { return(res); } Post fa = (Post)res.Result; return(postManager.Delete(fa)); }
public void Delete(int postId) { PostManager.Delete(postId); }
public void Delete(int id) { _repo.Delete(id); }