Example #1
0
        public ActionResult Create(Bell model)
        {
            try
            {
                BellwetherContext ctx = new BellwetherContext();
                model.User = new User() {UserName = User.Identity.Name};
                ctx.Bells.Add(model);
                ctx.SaveChanges();

                return RedirectToAction("Index", new { controller = "Home"} );
            }
            catch
            {
                return View();
            }
        }
Example #2
0
 //
 // GET: /Admin/BellAdmin/Create
 public ActionResult Create()
 {
     var bell = new Bell();
     return View(bell);
 }