public async Task<JsonResult> GetFeaturedArticle(int categoryId) { var article = await _service.GetFeaturedArticle(categoryId); var viewModel = new ArticleModel(article); return Json(viewModel); }
public async Task<JsonResult> GetArticleByUrl(int categoryId, string articleUrl) { var article = await _service.GetArticle(categoryId, articleUrl); var viewModel = new ArticleModel(article); return Json(viewModel); }
public async Task<JsonResult> GetArticle(int id) { var article = await _service.GetArticle(id); var viewModel = new ArticleModel(article); return Json(viewModel); }