ASP.NET MVC Indexes on Index and List
I am developing my first ASP.NET MVC application. This app keeps track of events, users, donors, etc. For a charitable organization. In event controllers, I support standard CRUD operations with new / Edit / Show views (deletion is done with a button on the Show view). But I also want to list all the events.
Is it better to have a List view that you go from Index view, or a List view as an index. The Index view is my default view for the controller. If you keep the index / list separate, what would you specify as the index?
For now, I tend to keep them separate and put the basic reference information in the Index view. Should I consider changing this setting and review the default List view and rename Index to Help?
TIA for collective wisdom SO.
source to share
I decided to redirect the index action to the List action. This saves me from having to create and maintain the index view, but leaves open the possibility that I can implement an index action that is other than a list of models.
public ActionResult Index()
{
return RedirectToAction( "List" );
}
source to share