public ActionResult Index(string id) { var result = new Entry[0]; string tag = id ?? "news"; result = _EntryAdapter.All().Where(e => !(DateTime.UtcNow > e.VisibleOn) && e.Tags.Contains(tag)).ToArray(); return View(result); }
public void Save(Entry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } entry.Slug = EnsureKey(entry.Slug); var collection = GetCollection(); collection.Save(entry); }