public ActionResult Create(BusinessDivision businessdivision)
 {
     if (ModelState.IsValid) {
         businessdivisionRepository.InsertOrUpdate(businessdivision);
         businessdivisionRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleIndustries = industryRepository.All;
         return View(businessdivision);
     }
 }
 public ViewResult Search(BusinessDivision searchBusinessDivision)
 {
     if(searchBusinessDivision!=null)
     {
                     }
                 return View("Index",businessdivisionRepository.AllIncluding(businessdivision => businessdivision.Industry));
 }
 public ActionResult Create()
 {
     BusinessDivision businessdivision = new BusinessDivision();
     ViewBag.PossibleIndustries = industryRepository.All;
     return View(businessdivision);
 }
 public void InsertOrUpdate(BusinessDivision businessdivision)
 {
     if (businessdivision.BusinessDivisionID == default(int)) {
         // New entity
         context.BusinessDivision.Add(businessdivision);
     } else {
         // Existing entity
         context.Entry(businessdivision).State = EntityState.Modified;
     }
 }