Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Domain-Driven Design
  3. ContosoUniversityCore

ContosoUniversityCore

MITJavaScript

A sample ASP.NET Core application implementing ContosoUniversity using CQRS, MediatR, and Entity Framework 6 with feature folder organization.

GitHubGitHub
587 stars145 forks0 contributors

What is ContosoUniversityCore?

ContosoUniversityCore is a sample ASP.NET Core web application that reimplements the classic Contoso University tutorial using modern architectural patterns like CQRS, MediatR, and feature folder organization. It demonstrates how to build maintainable, well-structured web applications with separation of concerns and vertical slice architecture. The project serves as a practical reference for developers transitioning to or learning ASP.NET Core with real-world patterns.

Target Audience

ASP.NET developers learning modern architectural patterns, teams adopting CQRS and vertical slices in their projects, and educators looking for a comprehensive sample application.

Value Proposition

It provides a fully working example of advanced ASP.NET Core patterns in a familiar context, making it easier to understand and apply these concepts in production applications. The use of Entity Framework 6 alongside ASP.NET Core also offers insights into integrating legacy frameworks with newer technologies.

Overview

ContosoUniversityCore is a reference implementation of the classic Contoso University sample application, rebuilt using modern ASP.NET Core patterns and practices. It serves as an educational resource for developers looking to understand architectural patterns in .NET web applications.

Key Features

  • CQRS and MediatR — Separates command and query responsibilities using the MediatR library for cleaner, more maintainable code.
  • AutoMapper — Simplifies object-to-object mapping between domain models and view models.
  • Feature Folders and Vertical Slices — Organizes code by feature rather than by technical layer, improving cohesion and discoverability.
  • HtmlTags — Provides a fluent API for generating HTML in views, enhancing readability and testability.
  • Entity Framework 6 — Uses the mature Entity Framework 6 ORM with ASP.NET Core, demonstrating integration with legacy frameworks.

Philosophy

The project emphasizes clean architecture, separation of concerns, and pragmatic organization through feature-based structuring, making it a valuable learning tool for real-world ASP.NET Core development.

Use Cases

Best For

  • Learning CQRS and MediatR patterns in ASP.NET Core
  • Understanding feature folder and vertical slice architecture
  • Integrating Entity Framework 6 with ASP.NET Core applications
  • Studying clean separation of commands and queries
  • Reference implementation for educational or training purposes
  • Migrating legacy .NET applications to ASP.NET Core patterns

Not Ideal For

  • Projects requiring the latest Entity Framework Core with .NET 5+ compatibility
  • Teams building microservices or distributed architectures needing service decoupling
  • Developers seeking rapid prototyping with minimal dependencies and setup overhead

Pros & Cons

Pros

CQRS with MediatR

Implements command and query separation using MediatR, leading to cleaner and more maintainable code as shown in the feature-based organization.

Feature Folder Organization

Uses vertical slices to group code by feature, improving cohesion and discoverability, which is emphasized in the README as a key practice.

Legacy Integration Example

Demonstrates how to integrate Entity Framework 6 with ASP.NET Core, providing practical insights for migrating older .NET applications.

Educational Reference

Serves as a comprehensive learning tool for modern ASP.NET Core patterns, as stated in its philosophy to teach clean architecture and separation of concerns.

Cons

Outdated ORM Choice

Relies on Entity Framework 6 instead of Entity Framework Core, which may hinder adoption in newer .NET environments and limit performance optimizations.

Manual Database Setup

Requires manually creating a database and running a SQL script, adding complexity compared to modern code-first migration approaches.

Sample App Limitations

As an educational sample, it lacks production-ready features like built-in authentication, logging, or error handling, making direct deployment risky.

Frequently Asked Questions

Quick Stats

Stars587
Forks145
Contributors0
Open Issues7
Last commit8 years ago
CreatedSince 2016

Tags

#cqrs#asp-net-core#educational#automapper#mediatr#web-application#sample-application

Built With

A
ASP.NET Core
A
AutoMapper
M
MediatR

Included in

Domain-Driven Design12.2k
Auto-fetched 18 hours ago

Related Projects

Modular MonolithModular Monolith

Full Modular Monolith application with Domain-Driven Design approach.

Stars13,872
Forks2,172
Last commit2 years ago
eShopOnWebeShopOnWeb

Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb

Stars10,693
Forks6,014
Last commit1 year ago
EquinoxProjectEquinoxProject

Web Application ASP.NET 9 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices

Stars6,781
Forks1,655
Last commit3 months ago
Event Sourcing .NETEvent Sourcing .NET

Examples and Tutorials of Event Sourcing in .NET

Stars3,675
Forks545
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub