Ejemplo n.º 1
0
 public ActionResult editor(string id, string title)
 {
     TextBlock block = BlockService.Get(id);
     if (block == null)
         block = new TextBlock { Title = title };
     return View(block);
 }
Ejemplo n.º 2
0
 public TextBlock Edit(string id, string title, string data)
 {
     TextBlock block = Get(id);
     if (block == null)
         block = new TextBlock();
     block.Title = title;
     block.Content = data;
     block.Save();
     Cached.Remove<TextBlock>(id);
     return block;
 }