public ActionResult Create(FormCollection form) { try { using (var context = new LibraryContainer()) { var note = new Note(); TryUpdateModel(note, new[] { "Title", "Date" }); note.Text = HttpUtility.HtmlDecode(form["Text"]); context.AddToNote(note); context.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(); } }