public ActionResult Create([Bind(Include = "PaymentTypeID,Description,DurationInMonths,Status,ActivityID")] PaymentType paymentType) { if (ModelState.IsValid) { paymentTypeRepository.InsertPaymentType(paymentType); paymentTypeRepository.Save(); return(RedirectToAction("Index")); } ViewBag.ActivityID = new SelectList(activityRepository.GetActivities(), "ActivityID", "Name", paymentType.ActivityID); return(View(paymentType)); }