|
DataContextConfigureViewTModel, THub(RequestContext, Object) Method
|
Configures a view establishing user roles based on modeled table TModel and SignalR THub.
Namespace: GSF.Web.ModelAssembly: GSF.Web (in GSF.Web.dll) Version: 2.4.248-beta
Syntaxpublic void ConfigureView<TModel, THub>(
RequestContext requestContext,
Object viewBag
)
where TModel : class, new()
where THub : new(), IRecordOperationsHub
Public Sub ConfigureView(Of TModel As {Class, New}, THub As {New, IRecordOperationsHub}) (
requestContext As RequestContext,
viewBag As Object
)
public:
generic<typename TModel, typename THub>
where TModel : ref class, gcnew()
where THub : gcnew(), IRecordOperationsHub
void ConfigureView(
RequestContext^ requestContext,
Object^ viewBag
)
member ConfigureView :
requestContext : RequestContext *
viewBag : Object -> unit when 'TModel : not struct, new() when 'THub : new() and IRecordOperationsHub
JavaScript does not support generic types or methods.
View SourceParameters
- requestContext RequestContext
- Url.RequestContext for view used to derive route ID, if any.
- viewBag Object
- Current view bag.
Type Parameters
- TModel
- Modeled database table (or view).
- THub
- SignalR hub that implements IRecordOperationsHub.
Remarks
This is normally called from controller before returning view action result.
For normal MVC views the common route is "{controller}/{action}/{id}", the {id} of
the route is the route ID parameter derived from the route data. In many use
cases this is a primary key or action value for the page, e.g., "ShowDeleted".
See Also