public async Task <IActionResult> Add() { var AP = new AddProductViewModel(); AP.categories = await cateRepo.GetAllCategory(); AP.vendors = await venRepo.GetAllVendors(); return(View(AP)); }
public async Task <JsonResult> getvondrer() { IEnumerable <Vendor> vendor = await venRepo.GetAllVendors(); //List<Vendor> vendors = new List<Vendor> //{ // new Vendor // { // categories=await cateRepo.GetAllCategory() // } //}; return(Json(vendor)); }
public IActionResult Index() { var items = _itemRepository.GetAllItems().OrderBy(i => i.UnitPrice); var vendors = _vendorReository.GetAllVendors(); var homeViewModel = new HomeViewModel(); homeViewModel.ItemsListTitle = "Products List"; homeViewModel._Items = items.ToList(); homeViewModel.VendorsListTitle = "Registered Vendors"; homeViewModel._Vendors = vendors.ToList(); return(View(homeViewModel)); }
public async Task <IEnumerable <Vendor> > GetAllVendors() { return(await _vendorRepository.GetAllVendors()); }
public async Task <IActionResult> Index() { var vendor = await vendorRepo.GetAllVendors(); return(View(vendor)); }
// GET: Vendors public IActionResult Index() { return(View(vendorRepo.GetAllVendors())); }
public List <VendorViewModel> GetAllVendors() { return(_VendorRepository.GetAllVendors()); }