public ActionResult ViewArticle(Guid id) { try { var article = _resourcesQuery.GetArticle(id); if (article == null) { return(JsonNotFound("article")); } var userId = CurrentMember == null ? CurrentAnonymousUser.Id : CurrentMember.Id; _resourcesCommand.ViewArticle(userId, article.Id); } catch (UserException ex) { ModelState.AddModelError(ex, new StandardErrorHandler()); } return(Json(new JsonResponseModel())); }
protected void ViewArticle(Guid articleId, int count) { ViewResource(articleId, count, (userId, resourceId) => _resourcesCommand.ViewArticle(userId, resourceId)); }