public ActionResult Index(int typeId) { var buildProjects = _domain.GetBuilds(Server.MapPath("~/App_Data/Builds.json")).ToList(); if (typeId == 0) { typeId = new Random(Guid.NewGuid().GetHashCode()).Next(1, buildProjects.Count); } var builds = buildProjects.Single(b => b.Id == typeId).Builds; var vm = new ViewModels.Builds.BuildStatus { ProjectId = typeId, Builds = builds }; return(View(vm.Builds.Count() > 8 ? "HighCount" : "LowCount", vm)); }