Method RegisterChildModel
| Improve this Doc View SourceRegisterChildModel<TModel, TChildModel>(Expression<Func<TModel, TChildModel>>, Func<TChildModel, T>)
Registers a child model.
Declaration
protected static Mounter<TChildModel> RegisterChildModel<TModel, TChildModel>(Expression<Func<TModel, TChildModel>> getter, Func<TChildModel, T> relationshipGetter)
where TModel : Model<T> 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<TChildModel, T> | relationshipGetter | Gets relationship between child model and parent model. |
Returns
Type | Description |
---|---|
Mounter<TChildModel> | Mounter of the child model. |
Type Parameters
Name | Description |
---|---|
TModel | The type of model which the child model is registered on. |
TChildModel | The type of the child model. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException |
|
System.ArgumentNullException |
|