public async Task <ActionResult> Dashboard(string id) { if (id == null) { throw new HttpException((int)HttpStatusCode.BadRequest, "Missing PoolName"); } var stats = await Svc.GetPoolSummaryAsync(PoolName : id); if (stats == null) { throw new HttpException((int)HttpStatusCode.NotFound, "PoolName was Not found"); } var Computers = await Svc.GetComputersByPoolNameAsync(PoolName : id); ViewBag.CurrentPool = id; ViewBag.Available = stats.PoolAvailable; ViewBag.Total = stats.PoolCount; ViewBag.InUse = stats.PoolInUse; return(View(Computers.OrderBy(c => c.ComputerName))); }