The ResourceController<TModel> comes ready to go with the following action methods.


Returns List(1).

List(int? page)

Lists the elements of a collection. If usePaging is "true", then the list will be a paged list. This method will return a view named "List" with a model of type IEnumerable<TModel>. If this is an XHR, this method will return a partial view named "ListControl" with a model of type PagedList<TModel>.


As part of the list paging, the UI needs to know the total number of pages. This should return the number of pages as part of a JSON request. If usePaging is "false", or if you write your own paging implementation, this action method may not be used.

Delete(object id)

Delete a record.

New() & New(TModel model)

GET and POST variants for creating a new record.

Edit(object id) & Edit(object id, TModel model)

GET and POST variants for editing an existing record.

Last edited Dec 8, 2010 at 3:59 PM by jarrettmeyer, version 2


No comments yet.