Building a service for the Movie Tickets application
Now that we have covered some of the basics of ASP.NET Web API, let's start building the backend service for our Movie Tickets application. Since this book is not about database or accessing data, the approach we are following is to hardcode data (data for objects are added while instantiating objects) that is returned by the service in a repository class and not to read the data from a database.
Let's look at the high-level view of our service architecture:
The service architecture is simplified so that we don't spend a lot of time on topics outside the context of the book, such as DB design, data access, and so on.
The requests from the client mobile app will be received by the ASP.NET Web API request pipeline and an action method in a controller will be invoked. The action method will, in turn, invoke the Business layer for fetching or updating data, which, in turn, invokes the Repository class to return hardcoded data . We will be discussing...