public ActionResult Edit(EmployeeStoreVM esVM)
        {
            EmployeeStoreVMRepo esRepo = new EmployeeStoreVMRepo(db);

            esRepo.Update(esVM);

            // go to index action method of the same controller.
            return(RedirectToAction("Index"));
        }
示例#2
0
 public EmployeeStoreVMController()
 {
     ctx    = new FoodStoreContext();
     esRepo = new EmployeeStoreVMRepo(ctx);
 }
        public ActionResult Edit(int employeeID, string branch)
        {
            var result = new EmployeeStoreVMRepo(db).Get(employeeID, branch);

            return(View(result));
        }
        public IActionResult Index()
        {
            var results = new EmployeeStoreVMRepo(db).GetAll();

            return(View(results));
        }