eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


Sidebar

en:howtos:dbadapter:sourceobject

Preparation of source objects

  1. Create a new project ( class library ) and add eBiss.DbAdapter.dll to References1).
  2. Create a new object that inherits from IMapObjectRoot 2).
  3. Now add the required attributes as appropriate for your database shown below.
[PrimaryKey(PrimaryKeyType.Counter, "Counters", "Name = 'HeaderTable'", "Current")]
public int Key;

This declares a primary key that gets the values from the Counters column Current with Name = HeaderTable .

[Relation("Key")]
public int HeaderKey;

This declares a field, depending on the Parent-Object Key , so that the field automatically gets the value of the referenced column.

[NotMapped]
public string RefTableKey = "10-Wert";

This declares a non-mapped field in the database. It is ignored while writing.

[LookupReference(LookupType.Optional, "RefTable", "Id", "LookupValue = @RefTableKey")]
public int RefTableRef;

This allows you to fill the reference from another table into the database. In this case, we look in RefTable for the column Id where LookupValue = Context of a local field name RefTableKey .

1)
If you need information on the scheme, you can refer to the structure from our HowTo create csv plugin
2)
You can also copy existing ones from your plug-ins
en/howtos/dbadapter/sourceobject.txt · Last modified: 2024/02/20 08:15 by 127.0.0.1