Use case – exposing WWTravelClub packages
In this section, we will implement an ASP.NET REST service that lists all the packages that are available for a given vacation’s start and end dates. For didactic purposes, we will not structure the application according to the best practices described in Chapter 11, Understanding the Different Domains in Software Solutions; instead, we will simply generate the results with a LINQ query that will be directly placed in the controller action method. A well-structured ASP.NET Core application will be presented in Chapter 16, Implementing Frontend Microservices with ASP.NET Core.
Let us make a copy of the WWTravelClubDB
solution folder and rename the new folder WWTravelClubREST
. The WWTravelClubDB project was built step by step in the various sections of Chapter 7, Interacting with Data in C# – Entity Framework Core. Let us open the new solution and add a new ASP.NET Core API project to it named WWTravelClubREST60
(the...