public IActionResult DeletePost(int id) { if (ModelState.IsValid) { var model = _postAppService.DeletePost(id); return(Ok(model)); } return(NotFound()); }
public async Task <IActionResult> OnPostDeletePostAsync() { var flag = await postService.DeletePost(UpdatedPostDto.Id); return(RedirectToPage("/Post/PostList")); }
public async Task <IActionResult> DeletePost(long id) { await _postAppService.DeletePost(id); return(Ok("deleted post")); }