public ActionResult Create(VendorServiceCategory vendorservicecategory) { if (ModelState.IsValid) { vendorservicecategoryRepository.InsertOrUpdate(vendorservicecategory); vendorservicecategoryRepository.Save(); return RedirectToAction("Index"); } else { return View(vendorservicecategory); } }
public ViewResult Search(VendorServiceCategory searchVendorServiceCategory) { if(searchVendorServiceCategory!=null) { } return View("Index",vendorservicecategoryRepository.All); }
public ActionResult Create() { VendorServiceCategory vendorservicecategory = new VendorServiceCategory(); return View(vendorservicecategory); }
public void InsertOrUpdate(VendorServiceCategory vendorservicecategory) { if (vendorservicecategory.VendorServiceCategoryID == default(int)) { // New entity context.VendorServiceCategory.Add(vendorservicecategory); } else { // Existing entity context.Entry(vendorservicecategory).State = EntityState.Modified; } }