public ActionResult Create(CategoryModel category) { try { // TODO: Add insert logic here CategoryBAL _categoryBAL = new CategoryBAL(); QuestionsCategory _QCategory = new QuestionsCategory(); _QCategory.Id = category.Id; _QCategory.Name = category.Name; _QCategory.CreatedBy = "Admin"; _QCategory.CreatedDate = DateTime.Now.ToUniversalTime(); _categoryBAL.AddQuestionCategory(_QCategory); return(RedirectToAction("Index")); } catch { return(View()); } }