I am using asp mvc3.I want to learn how to make my Urls friendly. this is my repository layer:
public Section GetBySectionId(int sectionId)
{
return context.Sections.Include("Groups").Include("Partners").Where(s => s.SectionId == sectionId).FirstOrDefault();
}
And this is the application layer:
public Section GetBySectionId(int sectionId)
{
return sectionRepo.GetBySectionId(sectionId);
}
And this is the controller:
public ActionResult Details(int id)
{
var section = Mapper.Map<SectionViewModel>(sectionApp.GetBySectionId(id));
return View(section);
}
Now for example if I go to a section's details with id=3 the browser url would change to ~/Section/Details/3
but I want it to be ~/Section in persian/Details in persian/My section name
.How can I do this.How to work with asp mvc routing?