Click or drag to resize

Business Model - Main Objects

[This is preliminary documentation and is subject to change.]

This topic contains the following sections:

BcfDataSet

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:

  • BcfDataSet and BcfDataSetSetup: Create another part of the class (e.g. implement partial "Initialized" method; create custom constructors).
  • BcfDataSet: Create a custom base class by inheriting BcfDataSet and configure it at Project-Settings: DataSet

See also:

Tables

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 Tip

The generated "TableOptions"-class is partial; feel free to add properties or implement interfaces in another part.

Note Note

When using "TableOption"-class generated BcfDataSet and BcfDataSetSetup have to be placed in the same assembly.

Customization options:

See also:

Columns

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 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 note Caution

Use immutable types or treat instances as immutable. Changing instance values will not been recognized and may cause unexpected behavior.

Customization options:

  • Add "Column Column Properties".

See also:

Relations

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:

Rows

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:

Cells
Faults

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: