Method RegisterChildModel
| Improve this Doc View SourceRegisterChildModel<TModel, TChildModel>(Expression<Func<TModel, TChildModel>>, Func<TModel, TChildModel>)
Registers a child model.
Declaration
protected static Mounter<TChildModel> RegisterChildModel<TModel, TChildModel>(Expression<Func<TModel, TChildModel>> getter, Func<TModel, TChildModel> constructor = null)
where TModel : Model where TChildModel : Model, new()
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TModel, TChildModel>> | getter | The lambda expression of the child model getter. |
System.Func<TModel, TChildModel> | constructor | The delegate to create the child model. |
Returns
Type | Description |
---|---|
Mounter<TChildModel> | Mounter of the child model. |
Type Parameters
Name | Description |
---|---|
TModel | Type of the model. |
TChildModel | Type of the child model. |