Esempio n. 1
0
 public IActionResult PostCount(Guid id)
 {
     try
     {
         var count = _repo.AddPostCount(id);
         return(Json(new { Count = count }));
     }
     catch
     {
         return(Json(new { Count = 0 }));
     }
 }
Esempio n. 2
0
 public IActionResult PostCount(string id)
 {
     try
     {
         var count = _postsRepository.AddPostCount(id);
         return(Json(new { Count = count }));
     }
     catch
     {
         return(Json(new { Count = 0 }));
     }
 }