Tamino API for .NET Version 8.2.2
 —  Tamino API for .NET  —

Working with Commands

All data processing is done via two classes: TaminoCommand and TaminoSchemaCommand. The TaminoCommand class is used to process Tamino documents, whereas the TaminoSchemaCommand class provides methods for manipulating Tamino document type information.

Each command object is always associated with a specific connection object. The TaminoConnection class provides methods for creating TaminoCommand and TaminoSchemaCommand objects. It is not essential for the connection to be open when creating commands, although as good programming practice we recommend opening the connection.


Creating TaminoCommand Objects

Use the CreateCommand method in the TaminoConnection class to create a TaminoCommand object. The method takes the Tamino collection name as a parameter. All commands of a specific TaminoCommand object are executed relative to this Tamino collection. The only exception to this rule is if the application works with URIs (see chapter Working with URIs).

Examples

...
TaminoCommand command1 = connection.CreateCommand("mycollection");
connection.Open(TaminoConnectionMode.AutoCommit);
...
TaminoCommand command2 = connection.CreateCommand("mycollection2");
...

Top of page

Creating TaminoSchemaCommand Objects

Use the CreateSchemaCommand method in the TaminoConnection class to create a TaminoSchemaCommand object. In contrast to TaminoCommand objects, a TaminoSchemaCommand object is not associated with a specific Tamino collection.

Top of page