Good evening I would like to know how do I have to modify the template .t4 of the controller? or what you have to change to be able to generate the files with Scaffold with the custom name.
- The file with the name Create.cshtml is created with the name Create.cshtml
- The file with the name Delete.cshtml is created with the name Delete.cshtml
- The file named Details.cshtml is created with the name Details.cshtml
- The file with the name Edit.cshtml is created with the name Edit.cshtml
- This can keep the same name Index.cshtml - > Index.cshtml
Modifying the controller template I managed to change the action methods that the Scaffold automatically creates for me:
// GET: Cuentas
public ActionResult Index()
{
return View(db.Cuentas.ToList());
}
// GET: Cuentas/Details/5
public ActionResult Detalles(string id)
{
//Codigo Autogenerado
return View(cuenta);
}
// GET: Cuentas/Create
public ActionResult Crear()
{
return View();
}
That's fine, but as I said: I do not know how to generate the CRUD files with the names I want, thanks.