using System.Web.Mvc; public class HomeController : IController { public void Execute(RequestContext requestContext) { // Your controller code here } }
public class MyController : Controller { public ActionResult Index() { // Your code here } public ActionResult About() { // Your code here } }In this example, `MyController` derives from `Controller`, which implements `IController`. The `Index` and `About` actions are executed when the corresponding URL is requested. Package library: `System.Web.Mvc` (part of the ASP.NET MVC framework).