Пример #1
0
        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);
        }
Пример #2
0
        public void Save(Entry entry)
        {
            if (entry == null)
            {
                throw new ArgumentNullException("entry");
            }

            entry.Slug = EnsureKey(entry.Slug);

            var collection = GetCollection();
            collection.Save(entry);
        }