public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here var model = new SalaryItem(); TryUpdateModel(model); model.CreatedAt = DateTime.Now; model.CreatedBy = SessionItems.CurrentUser.UserID; model.Insert(); return(RedirectToAction("Index")); } catch { return(View()); } }