private async Task <ProductsCompatibilityViewModel> GetProdCompViewModel() { return(new ProductsCompatibilityViewModel { AllProdCompatibilities = await _repoProdComp.GetAllAsync(), AllProducts = await _repoProd.GetAllAsync(), Compatibilities = await _repoComp.GetAllAsync(), }); }
//[Authorize(Roles = "admin, user")] public async Task <IActionResult> Index() { var homeProducts = new HomeViewModel { AllProducts = await _repoProd.GetAllAsync(), AllProductsCompatibilities = await _repoProdComp.GetAllAsync() }; return(View(homeProducts)); }