Class BaseTreeViewRelatedController<SI, T>
A base controller for handling the IBaseTreeView<T> view for all entities related to a parent item
Inheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: ClientCore.dll
Syntax
public abstract class BaseTreeViewRelatedController<SI, T> : BaseTreeViewController<T>, IModelViewController, ICollectionExportable where SI : IBaseEntity where T : IBaseEntity
Type Parameters
Name | Description |
---|---|
SI | The type of parent item that all entities in the tree view are related to |
T | The treeview works with any entity type |
Constructors
BaseTreeViewRelatedController(IBaseTreeView<T>)
Creates a new BaseTreeViewRelatedController for the specified instance of a tree view
Declaration
public BaseTreeViewRelatedController(IBaseTreeView<T> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseTreeView<T> | view | The instance of the tree view in the client application |
Properties
GetRelationPropName
The name of the property on the entity type T
that holds the value to the instance of the parent item of type SI
in this tree view
Declaration
protected abstract string GetRelationPropName { get; }
Property Value
Type | Description |
---|---|
System.String |
SingleItem
The parent single item that all entities in the tree view are related to
Declaration
public SI SingleItem { get; }
Property Value
Type | Description |
---|---|
SI |
Methods
GetQuery()
Overrides the query to also ensure it only loads entities of type T
that are related to the parent SI
item
Declaration
protected override QueryableExecuter<T> GetQuery()
Returns
Type | Description |
---|---|
QueryableExecuter<T> |
Overrides
UpdateNewItem(T)
Ensures that any new item is also automatically related to the parent single item of type SI
Declaration
protected override void UpdateNewItem(T newItem)
Parameters
Type | Name | Description |
---|---|---|
T | newItem | The newly created entity in the tree view |