public async void GetProductList() { list = new List <SyncProduct>(); var syncProducts = await _printfulServices.GetFullInventory(); list = syncProducts.Result.ToList(); }
public async Task <IActionResult> GetInventory() { var result = await _printfulService.GetFullInventory(); var total = result.Result.ToList(); return(Ok(total)); }
//private IFrontPageViewModel _frontPageViewModel; //public HomeController(IFrontPageViewModel frontPageViewModel) //{ // _frontPageViewModel = frontPageViewModel; //} public async Task <IActionResult> Index() { var list = await _printfulServices.GetFullInventory(); var total = list.Result.ToList(); return(View(total)); }