public ActionResult LoadOrderBasketOptions(int supplierId) { //check if any orders exists var orderbaskets = _orderApi.AllOrderBasketForRetailerSupplier(1, supplierId); if (orderbaskets.Any()) { //if any orders exists user must choose one or choose to create a new order var viewmodel = new OrderBasketOptionsViewModel() { OrderBaskets = orderbaskets, RetailerId = 1, SupplierId = supplierId }; return(PartialView("~/Views/Retailer/BrowseSuppliers/_OrderBasketOption.cshtml", viewmodel)); } //else create a new order and load products else { return(CreateNewBasket(supplierId)); } }