public Article AddArticle(Article toAdd) { toAdd.PostedOn = DateTime.UtcNow; this.articles.SaveChanges(); return toAdd; }
public IQueryable<Article> UpdateArticle(Article update) { update.PostedOn = DateTime.UtcNow; this.articles.Update(update); this.articles.SaveChanges(); return this.articles.All().Where(a => a.Id == update.Id); }