Ejemplo n.º 1
0
        Entry IBlogRepository.CreateEntry()
        {
            var Result = new Entry();
            this.Context.Entries.Add(Result);

            return Result;
        }
Ejemplo n.º 2
0
        public ActionResult EditEntry(Entry entry)
        {
            MarkupSanitizer sanitizer = new MarkupSanitizer();

            var OriginalEntry = BlogEngine.GetBlogEntry(entry.Id);
            OriginalEntry.Title = sanitizer.Sanitize(entry.Title);
            OriginalEntry.EntryText = sanitizer.Sanitize(entry.EntryText);
            OriginalEntry.IsRawHtml = true; //we need to consider getting rid of this, probably not needed anymore.
            OriginalEntry.Tags = sanitizer.Sanitize(entry.Tags);
            OriginalEntry.EditedDate = DateTime.Now;
            BlogEngine.UpdateEntry(OriginalEntry);
            return this.RedirectHome();
        }