- Create an empty ASP.NET Core Web Application
- Add a the default ASP.NET MVC route using
UseMvcWithDefaultRoute - Add the necessary NuGet packages
- Create the HomeController with an Index action method and return a simple string
- Run the application
- Create an action method Greeting1 that returns a "Hello, " prefix, and use this URL format: Greeting1/Stephanie
- Create an action method Greeting2 that returns a "Hello, " prefix, and use this URL format: Greeting2?name=Matthias
- Create a new route using
UseMvcfor a route like this: Add/3/5 - Implement the action method Add to return an integer value
- Create Book class with a few simple properties in the Models directory
- Create the GetBook action method to return the Book in JSON format
- Create the RedirectSample action method that redirects the request to a different Website, e.g. http://www.cninnovation.com
- Create a BooksRepository class in the Models directory
- Define the GetBook method to return a Book instance
- Define a interface for the BooksRepository, e.g. IBooksRepository
- Register the interface and the concrete class with the dependency injection framework
- Make use of the IBooksRepository contract with the HomeController