public ActionResult Create(int vendorId)
 {
     VendorSupplierDiversityCertificateInfo vendorsupplierdiversitycertificateinfo = new VendorSupplierDiversityCertificateInfo();
     vendorsupplierdiversitycertificateinfo.VendorID = vendorId;
     ViewBag.PossibleVendorSupplierDiversityCertificationCategories = vendorsupplierdiversitycertificationcategoryRepository.All;
     ViewBag.PossibleCountries = countryRepository.All;
     return View(vendorsupplierdiversitycertificateinfo);
 }
 public ActionResult Create(VendorSupplierDiversityCertificateInfo vendorsupplierdiversitycertificateinfo,int vendorId)
 {
     if (ModelState.IsValid) {
         vendorsupplierdiversitycertificateinfoRepository.InsertOrUpdate(vendorsupplierdiversitycertificateinfo);
         vendorsupplierdiversitycertificateinfoRepository.Save();
         return RedirectToAction("Index",new { vendorId=vendorId });
     } else {
         ViewBag.PossibleVendorSupplierDiversityCertificationCategories = vendorsupplierdiversitycertificationcategoryRepository.All;
         ViewBag.PossibleCountries = countryRepository.All;
         return View(vendorsupplierdiversitycertificateinfo);
     }
 }
 public void InsertOrUpdate(VendorSupplierDiversityCertificateInfo vendorsupplierdiversitycertificateinfo)
 {
     if (vendorsupplierdiversitycertificateinfo.VendorSupplierDiversityCertificateInfoID == default(int)) {
         // New entity
         context.VendorSupplierDiversityCertificateInfo.Add(vendorsupplierdiversitycertificateinfo);
     } else {
         // Existing entity
         context.Entry(vendorsupplierdiversitycertificateinfo).State = EntityState.Modified;
     }
 }
 public ViewResult Search(VendorSupplierDiversityCertificateInfo searchVendorSupplierDiversityCertificateInfo,int vendorId)
 {
     if(searchVendorSupplierDiversityCertificateInfo!=null)
     {
                     }
                 return View("Index",vendorsupplierdiversitycertificateinfoRepository.AllIncluding(vendorId,vendorsupplierdiversitycertificateinfo => vendorsupplierdiversitycertificateinfo.Vendor, vendorsupplierdiversitycertificateinfo => vendorsupplierdiversitycertificateinfo.VendorSupplierDiversityCertificationCategory, vendorsupplierdiversitycertificateinfo => vendorsupplierdiversitycertificateinfo.Country, vendorsupplierdiversitycertificateinfo => vendorsupplierdiversitycertificateinfo.State));
 }