Business Model - Main Objects |
[This is preliminary documentation and is subject to change.]
The BcfDataSet is the main object of business-layer. It contains the tables with their data and manages calculation and transaction processing. BcfDataSet construction requires a BcfDataSetSetup specifying the schema. Once a BcfDataSet is created its schema is immutable. BCF-Editor generates code creating a BcfDataSetSetup and a typed BcfDataSet using the generated BcfDataSetSetup as parameter. Modifying the created DataSetSetup before it passed as constructor parameter is possible.
Customization options:
See also:
BcfTableTRow, TOptions is the generic base for typed tables in a typed BcfDataSet. BCF-Editor generates a property for each table in typed BcfDataSet class. This grants typed access to the table and its rows. The 2nd typeparameter are the table-options. BCF-Editor supports custom settings on tables. To grant typesafe access to settings a "TableOptions"-class will be generated. Once a table-option property is created a column is added to the table-grid (see: Table: Settings-Option Properties...).
Tip |
---|
The generated "TableOptions"-class is partial; feel free to add properties or implement interfaces in another part. |
Note |
---|
When using "TableOption"-class generated BcfDataSet and BcfDataSetSetup have to be placed in the same assembly. |
Customization options:
See also:
BcfColumnT, TOptions is the generic column class. As like as typed tables BCF-Editor generates a property for each column in typed BcfTable class. Also the 2nd typeparameter are the column-options. Create column-option properties using the "column option grid" (see: Column Option Properties: Settings) The custom properties will be added as columns on column grid (see: Column: Settings-Option Properties...).
Note |
---|
When using "ColumnOption"-class generated BcfDataSet and BcfDataSetSetup have to be placed in the same assembly. |
All .net types except open generic types and static classes a valid column-value types.
Caution |
---|
Use immutable types or treat instances as immutable. Changing instance values will not been recognized and may cause unexpected behavior. |
Customization options:
See also:
Relations are the way to link rows in different tables in a dataset. A BcfRelation does not depends on key-columns. Key-columns are supported and using them will simplify loading data (because the relations between rows are inferred from key-values; without key-columns you have to assign parent-rows after load).
Using key-columns causes BcfDataSet to maintain parent- and child-key indexes.
See also:
The BcfRow stores the column values in typed cells. So the typed value-properties generated by BCF-Editor will not cause boxing or unboxing. It is recommended to use these properties rather than the untyped GetValueObject and SetValueObject methods. Getting a cell-values is pure - even on computed columns and when getting parent row references.
The child-rows collections accessible via generated properties are mutable. So enumerating will fail when the collection changes. To enumerate save use their "Immutable"-property. It returns an internal immutable collection.
Customization options:
See also:
The BcfCellT stores single value an can be accessed by its owning row. Since BCF 4.0 the cells are typed. To avoid unnecessary casts on typed cell access, prefer BcfRowGetCell over (BcfCell<int>)myRow.Cells[0].
See also:
A BcfFault is the result of a BcfRule check. The fault contains the BcfFaultMessage and a list of cells tagged with the message.
There are several ways to access the faults.
Customization options:
See also: