public void VisitArticle(int articleId, string userId) { Visit visit = new Visit(){ ArticleId = articleId, UserId = userId, VisitDate = DateTime.Now }; QueryExecutor.Instance.CreateVisit(visit); Global.Instance.ArticlesRepository.VisitArticle(articleId); }
public void VisitArticle(int articleId, string userId) { Visit visit = new Visit() { ArticleId = articleId, UserId = userId, VisitDate = DateTime.Now, Article = Global.Instance.ArticlesRepository.GetArticle(articleId), User = GetAppUser(userId) }; Visits.Add(visit); Global.Instance.ArticlesRepository.VisitArticle(articleId); }