finds.dev← search

// the find

jbogard/ContosoUniversityDotNetCore-Pages

★ 1,763 · C# · MIT · updated Apr 2026

With Razor Pages

Jimmy Bogard's opinionated rewrite of the classic Microsoft Contoso University tutorial app, using Razor Pages with vertical slice architecture, MediatR, AutoMapper, and FluentValidation. It's a reference implementation showing how someone who actually ships .NET apps would structure a CRUD web project, not how Microsoft's tutorials teach it. Useful if you want a concrete example of these patterns working together rather than reading blog posts about them in isolation.

Vertical slice architecture is applied consistently — each feature (Create, Edit, Delete, Index) lives in its own file with its own command/query, handler, and validator co-located rather than scattered across Controllers/Services/Repositories layers. Integration tests cover every page action against what appears to be a real database fixture (SliceFixture), not mocked repositories, which means the tests actually catch EF query issues. The HtmlTags integration for form generation is an interesting alternative to tag helpers that produces cleaner page models — the form building logic is centralized in conventions rather than repeated in every .cshtml. Updated to .NET 10 with .NET Aspire for local orchestration, so it's not abandonware sitting on .NET Core 2.1.

This is still a tutorial app at heart — the domain is trivially simple (students, courses, departments), which means the vertical slice approach never gets stress-tested by anything genuinely complex like cross-aggregate transactions or event-driven side effects. HtmlTags is a niche library with minimal community momentum; adopting it because you saw it here means adding a dependency most .NET devs won't recognize in code review. AutoMapper is present but its use in page models is exactly the kind of 'map everything to a ViewModel' pattern that causes subtle bugs when properties are added to the entity but not the mapping profile. The SQL migration files in App_Data/up/ sit alongside EF Core, which suggests a hybrid migration strategy that could get confusing — it's not obvious which owns schema changes.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →