public ActionResult Create(VendorAccountManager vendoraccountmanager,int vendorId)
 {
     if (ModelState.IsValid) {
         vendoraccountmanagerRepository.InsertOrUpdate(vendoraccountmanager);
         vendoraccountmanagerRepository.Save();
         return RedirectToAction("Index",new { vendorId=vendorId });
     } else {
         return View(vendoraccountmanager);
     }
 }
 public void InsertOrUpdate(VendorAccountManager vendoraccountmanager)
 {
     if (vendoraccountmanager.VendorAccountManagerID == default(int)) {
         // New entity
         context.VendorAccountManager.Add(vendoraccountmanager);
     } else {
         // Existing entity
         context.Entry(vendoraccountmanager).State = EntityState.Modified;
     }
 }
 public ActionResult Create(int vendorId)
 {
     VendorAccountManager vendoraccountmanager = new VendorAccountManager();
     vendoraccountmanager.VendorID = vendorId;
     return View(vendoraccountmanager);
 }
 public ViewResult Search(VendorAccountManager searchVendorAccountManager,int vendorId)
 {
     if(searchVendorAccountManager!=null)
     {
                     }
                 return View("Index",vendoraccountmanagerRepository.AllIncluding(vendorId,vendoraccountmanager => vendoraccountmanager.Vendor, vendoraccountmanager => vendoraccountmanager.VendorManagerUser));
 }