public IActionResult All(int page = 1) { var allParts = this.partService.All(page, PageSize); var allPartViewModel = new AllPartViewModel() { Parts = allParts, CurrentPage = page, TotalPages = (int)Math.Ceiling(this.partService.TotalParts() / (double)PageSize) }; return(View(allPartViewModel)); }
public ActionResult Delete(int id) { AllPartViewModel partVm = this.service.GetAllPartById(id); return(View(partVm)); }