Start by opening Visual Studio or VS Code. Create a new project, select 'ASP.NET Core Console Application'.
You'll see a basic project with a 'src' folder. Navigate to the 'src' folder. You'll find a `Program.cs` file. This is the entry point for your application.
In the `Program.cs` file, add a namespace like this:
using Microsoft.AspNetCore.Mvc;
Add a new line after the `using` statement and use the following code:
public class MyStartup : IStartup
//This class is an implementation of IStartup, it provides startup information to the ASP.NET Core framework.
//For each request it will handle
//using Microsoft.AspNetCore.RoutingProviders;
//public class MyStartup : IStartup {
// public override void OnPreStart()
// {
// Console.WriteLine("Startup Started");
// }
//}
In the `Program.cs` file, find the `RouteMap` line and modify it to include a route that runs your controller.
@Route("GET:your-controller-path", EmptyRouteRunner)
// Your controller logic here.