public void Insert(Article article) { var currentUser = System.Threading.Thread.CurrentPrincipal.Identity.Name; article.PublishedBy = currentUser; article.PublishedDate = DateTime.UtcNow; Articles.Add(article); SaveChanges(); }
public void Publish(Article article) { _articleContext.Insert(article); Clients.All.published(article); }