@page @using OliverBooth.Data.Web @using OliverBooth.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.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.Hiatus: break; }
}
}