예제 #1
0
 public ActionResult Add(FormCollection form)
 {
     using (var context = new ContentStorage())
     {
         var template = new MailTemplate
                            {
                                Title = form["Title"], 
                                Text = HttpUtility.HtmlDecode(form["Text"])
                            };
         context.AddToMailTemplate(template);
         context.SaveChanges();
     }
     return RedirectToAction("Subscribers", "Subscribe", new { Area = "" });
 }