C# Advent 2020 - ASP.NET Core API Endpoints
MVC is a mess. Controllers in one folder, views in another, services in another, models and viewmodels in yet other folders. Related files are all over the place. Trying to piece together these related pieces can be a real pain. Steve “ardalis” Smith has come up with another way: ASP.NET Core API Endpoints.
The concept is a simple one. Everything that’s related can easily be put in one folder, maybe even in one file. Steve explains much better: “Instead of Model-View-Controller (MVC) the pattern becomes Request-EndPoint-Response (REPR). The REPR (reaper) pattern is much simpler and groups everything that has to do with a particular API endpiont together.” By putting everything together, maintenance and development are all much easier. As Steve notes, this is a concept that the .NET team has done in creating Razor pages.