Provides commonly used extensions.
Formats the command to by written.
public String FormatForLogging(command)
A textual representation of a command.
Name | Type | Summary |
---|---|---|
command | IDbCommand | Command to be written. |
Gets the first IDataProperty within the collection that matches the automaticType property. If no property matches the automatic type or automaticType is Nonenull is returned.
public IDataProperty GetAutomaticDataProperty(properties, automaticType)
An IDataProperty of null if none matches.
Name | Type | Summary |
---|---|---|
properties | ICollection<IDataProperty> | A collection of properties. |
automaticType | AutomaticType | Automatic type to find. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when properties is null. |
Gets the first Field within the collection that matches the automaticType property. If no fields matches the automatic type or automaticType is Nonenull is returned.
public Field GetAutomaticField(fields, automaticType)
A Field of null if none matches.
Name | Type | Summary |
---|---|---|
fields | ICollection<Field> | A collection of fields. |
automaticType | AutomaticType | Automatic type to find. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when fields is null. |
Gets the first Field within the collection that matches the name. If no fields matches the specified namenull is returned.
public Field GetField(fields, name)
A Field of null if none matches.
Name | Type | Summary |
---|---|---|
fields | ICollection<Field> | A collection of fields. |
name | String | Name of the field to match (case sensitive). |
Type | Summary |
---|---|
ArgumentNullException | Thrown when fields is null. |
Gets the name of the partition key data property or null if model does not has a partition key property.
public String GetPartitionKeyPropertyName(model)
The name of the partition key property or null.
Name | Type | Summary |
---|---|---|
model | IDataModel | An IDataModel. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when model is null. |
Finds if the fields collection has primary key fields.
public Boolean HasPrimaryKeys(fields)
true if the collection has primary key fields.
Name | Type | Summary |
---|---|---|
fields | ICollection<Field> | A collection of fields. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when fields is null. |
Checks whether the property is an IDataProperty.
public Boolean IsDataProperty(property)
true if property is an IDataProperty, otherwise false.
Name | Type | Summary |
---|---|---|
property | PropertyInfo | A PropertyInfo for the property to check. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when property is null. |