@page @using OliverBooth.Common.Data.Web.Projects @using OliverBooth.Common.Services @inject IProjectService ProjectService @{ ViewData["Title"] = "Projects"; IEnumerable projects = ProjectService.GetProjects(ProjectStatus.Ongoing).OrderBy(p => p.Rank) .Concat(ProjectService.GetProjects(ProjectStatus.Past).OrderBy(p => p.Rank)) .Concat(ProjectService.GetProjects(ProjectStatus.Retired).OrderBy(p => p.Rank)) .Concat(ProjectService.GetProjects(ProjectStatus.Hiatus).OrderBy(p => p.Rank)); }

Projects

@foreach (IProject[] chunk in projects.Chunk(2)) {
@foreach (IProject project in chunk) {
@switch (project.Status) { case ProjectStatus.Ongoing: break; case ProjectStatus.Past: break; case ProjectStatus.Retired: break; case ProjectStatus.Hiatus: break; }
}
}