I have the following in my controller:
    public ActionResult Details(string name)
    {
        Student student = db.Students.FirstOrDefault(x => x.FirstName == name);
        if (student == null)
        {
            return HttpNotFound();
        }
        return View(student);
    }
    // GET: /Student/Details/5
    public ActionResult Details(int? id)
    {
        if (id == null)
        {
            return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
        }
        Student student = db.Students.Find(id);
        if (student == null)
        {
            return HttpNotFound();
        }
        return View(student);
    }
RouteConfig.cs:
        // /Student/Details/Id
        routes.MapRoute(
            name: "StudentDetailsId",
            url: "{Student}/{Action}/{id}",
            defaults: new { controller = "Student", action = "Details", id = UrlParameter.Optional },
            constraints: new { id = @"\d+" }
        );
        // /Student/Details/Name
        routes.MapRoute(
            name: "StudentDetailsName",
            url: "{Student}/{Details}/{name}",
            defaults: new { controller = "Student", action = "Details" }
        );
        // /Student/Name
        routes.MapRoute(
            name: "StudentName",
            url: "{Student}/{name}",
            defaults: new { controller = "Student", action = "Details" }
        );
So pretty much I would like to have the same action name but fetched with either an id:int or string.
However I get the following:
The current request for action 'Details' on controller type 'StudentController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Details(System.String) on type MySuperAwesomeMVCApp.Controllers.StudentController
System.Web.Mvc.ActionResult Details(System.Nullable`1[System.Int32]) on type MySuperAwesomeMVCApp.Controllers.StudentController