public ActionResult Create(SiteNews model) { var flag = TryValidateModel(model); if (flag) { model.PublishDate = DateTime.Now.ToString("yyyy-MM-dd hh:mm"); siteNewsRepository.Add(model); return(RedirectToAction("Index")); } return(View(model)); }
public Task <RunResult <DetailedNews> > GetNewsArticleDetailsAsync(SiteNews news) { return(GetNewsArticleDetailsAsync(news.SiteID, (int)news.ID)); }
public RunResult <DetailedNews> GetNewsArticleDetails(SiteNews news) { return(GetNewsArticleDetails(news.SiteID, (int)news.ID)); }