{{indexmenu_n>10}} ===== A simple class structure ===== The following is an example of a Simple Class Structure for reading row from table: CREATE TABLE[dbo].[DbAdapterTest] ( [Id][int] NOT NULL, [LastName] [varchar] (50) NOT NULL, [FirstName] [varchar] (50) NOT NULL ) The best way to create the structure is to use [[en:programmierung:typbibliotheken:start|]], create a type using "database adapter object" and then define the structure: {{ :howtos:dbadapter:db_adapter_simple_struct.png?300 |}} In the example 'Item' is supposed to take the data from the table 'DbAdapterTest'. * the attribute MapTrigger must be defined and * the public name with DbAdapterTestg must be specified. If the field name differs from the column name of the table, then the public name must also be assigned here. In the example here the field 'Name' has the public name 'LastName'. The template for the type can be found under * StandardTemplates\DBAdapter\eBissTypeLib\TypeLibraryeBiss_TypeLib_DbAdapter.xml As C# code: public class DbAdapterSample : IDbMapObjectRoot { [MapExternalName("DbAdapterTest"), MapTrigger] public List Items; } public class DbAdapterSampleItems : IMapObjectItem { public int Id; [MapExternalName("LastName")] public string Name; public string FirstName; }