Contoso University Examples with CQRS, MediatR, AutoMapper and more

综合编程 2018-07-26 阅读原文

I was a bit surprised yesterday to see Scott Hanselman's post on my Contoso University sample app
. That application basically takes the traditional Contoso University sample applications (of which there have been many), and try to adapt it to how our "normal" ASP.NET applications are built. Mainly these applications serve as working examples for our own internal teams, so that when we spin up a new application, we have something to work from.

These applications highlight our typical usage of:

  • AutoMapper
  • MediatR
  • Feature Folders
  • FluentValidation
  • HtmlTags
  • Filters
  • Fixie
  • Integration testing
  • Respawn
  • AppVeyor
  • Octopus Deploy

To achieve a cleaner architecture. Since I'm just going off of the Contoso University samples from Microsoft, they're not the most complicated applications, but good enough for our purposes. If I was building an actual Contoso University like the sample, I wouldn't use many of these tools, but this application is "big enough" to show some different usages and give our teams a good starting point.

The different Contoso University samples I've created include:

There are a couple of other Docker-based versions, too, but those are more experiments than examples for our team.

I like the Contoso University sample applications because they're big enough to give me an idea of a typical server-side application and how our toolset can be applied, as well as a way for me to test out our toolchain without worrying about breaking our client's code.

In a future series, I'll walk through each of these tools specifically on some of the motivations, but for now, I just like having something I can pull down and experiment with!

We at Headspring do a number of other different kinds of systems, from Xamarin, WPF, React/Redux w/ ASP.NET Core Web API, so I'd love to build versions of Contoso University for those.

However, the challenge is finding someone else that's already put in the work for a decent, full-featured sample app! If you find one for those platforms, please let me know because selfishly, I'd love to build living, working examples for our teams 🙂

责编内容by:Jimmy Bogard 【阅读原文】。感谢您的支持!


ABP框架 – 介绍 在14,15年间带领几个不同的团队,交付了几个项目,在这个过程中,虽然几个项目的业务不一样,但是很多应用程序架构基础性的功能却是大同小异,例如认证、授权、请求验...
AutoMapper – Declarative data mapper for PHP 7 AutoMapper can map data from array/object to existing array/object or marsh...
AutoMapper extensions for Microsoft DI 5.0 release... Hot off the presses, with some pretty big breaking changes. For the unfamiliar,...
Put an icon between the two divs place a div inside another div keeping spaces between the two div ...
Automapping has no mapped ID My Entity Class: public class Building { /// /// interna...