Exemple #1
0
 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"));
        }
Exemple #3
0
        public async Task <IActionResult> DeletePost(long id)
        {
            await _postAppService.DeletePost(id);

            return(Ok("deleted post"));
        }