- Add another folder to your application called Controllers:
- Inside the Controllers folder, add a new class called StudentController. Inside the StudentController, add a method called Find(). When you are done, your class will look as follows:
public class StudentController { public string Find() { return "Found students"; } }
- Back in the Startup class, add a private void method called FindController() that takes a parameter of type IRouteBuilder. Make sure that you also add the using Microsoft.AspNetCore.Routing; namespace to your class. Your method should look as follows:
private void FindController(IRouteBuilder route) ...