MultitenantDataModelCmdBuilder

MultitenantDataModelCmdBuilder implements an IDataModelCmdBuilder that builds database commands for IDataModel objects.

Namespace:
Inetdev.Multitenancy
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
Inetdev.Data.DataModelCmdBuilder

Constructors

MultitenantDataModelCmdBuilder

Default constructor

Signature:
public Void MultitenantDataModelCmdBuilder()

Methods

BuildDelete

Builds a delete command for the model.

Signature:
public IDbCommand BuildDelete(model, timestampKind, expectedTimestamp)
Returns

A delete command to be executed.

Parameters
Name Type Summary
model IDataModel An IDataModel.
timestampKind TimestampKind Timestamp configuration.
expectedTimestamp DateTime The expected timestamp value.
Exceptions
Type Summary
ArgumentNullException Thrown when model is null.
MissingPartitionKeyPropertyException Thrown when model does not has a partition key property.
FieldNotFoundException Thrown when the Field for the partition key could not be found.
MissingWhereClauseException Thrown when the WHERE clause could not be built.
MissingPartitionKeyException Thrown when the partition key was not set in model.

BuildUpdate

Builds an update command for the model.

Signature:
public IDbCommand BuildUpdate(model, timestampKind, expectedTimestamp)
Returns

An update command to be executed.

Parameters
Name Type Summary
model IDataModel An IDataModel.
timestampKind TimestampKind Timestamp configuration.
expectedTimestamp DateTime The expected timestamp value.
Exceptions
Type Summary
ArgumentNullException Thrown when model is null.
MissingPartitionKeyPropertyException Thrown when model does not has a partition key property.
FieldNotFoundException Thrown when the Field for an IDataProperty could not be found.
MissingWhereClauseException Thrown when the WHERE clause could not be built.
MissingPartitionKeyException Thrown when the partition key was not set in model.