public async Task <IActionResult> Index() { client = new ServiceReference1.AuctionsServiceClient(); var res = await client.GetAllAuctionItemsAsync(); return(View(res)); }
public async Task <IActionResult> About(string name) { ServiceReference1.AuctionsServiceClient client = new ServiceReference1.AuctionsServiceClient(); var res = await client.GetAllAuctionItemsAsync(); var res2 = res.Where(x => x.BidCustomName == name); return(View("index", res2)); }
public async Task <IActionResult> Details(int id) { client = new ServiceReference1.AuctionsServiceClient(); var res = await client.GetAllAuctionItemsAsync(); var singleItem = res.Where(x => x.ItemNumber == id).SingleOrDefault(); if (singleItem != null) { return(View(singleItem)); } else { Response.Redirect("/"); } return(View()); }
public async Task <IActionResult> Index() { List <ServiceReference1.AuctionItem> auctionItems = await service.GetAllAuctionItemsAsync(); return(View(auctionItems)); }