Allows implementation data services for domain models.
Get the alias of the database table.
public String Alias { get; }
Get or set the engine service command builder.
public IDbCmdBuilder CommandBuilder { get; set; }
Get or set the DataAccess interface object.
public IDbAccess DataAccessAPI { get; set; }
Get or set the data update logger object.
public IDataModelAuditor DataModelAuditor { get; set; }
Get or set the SQL bulder object.
public IDataModelCmdBuilder DataModelCmdBuilder { get; set; }
Get a list that contains the definition of table fields.
public IDictionary<String, Field> Fields { get; set; }
Get or set the schema or owner of database objects.
public String Schema { get; set; }
Get or set the name of the sequence to use.
public String SequenceName { get; set; }
Converts string to object of a specified DbType.
public IStringToDbTypeConverter StringToDbTypeConverter { get; set; }
Get the table name.
public String Table { get; }
Appends to the where clause all set terms.
public Void AppendFilterTerms(statement, terms, match)
Name | Type | Summary |
---|---|---|
statement | Statement | Statement to add terms. |
terms | List<Term> | A collections of terms. |
match | MatchKind | How to match the terms. |
Appends to the where clause all set static terms.
public Void AppendStaticTerms(statement, terms)
Name | Type | Summary |
---|---|---|
statement | Statement | Statement to add terms. |
terms | List<StaticTerm> | A collections of terms. |
Deletes a record from the underlaying data source.
public Int32 Delete(model, timestampKind, expectedTimestamp)
Amount of records affected.
Name | Type | Summary |
---|---|---|
model | IDataModel | The object to delete. |
timestampKind | TimestampKind | Kind of timestamp to apply on the WHERE clause. |
expectedTimestamp | DateTime | Timestamp that is expected to be on the database. |
Deletes a record from the underlaying data source asyncronously.
public Task<Int32> DeleteAsync(model, timestampKind, expectedTimestamp)
Amount of records affected.
Name | Type | Summary |
---|---|---|
model | IDataModel | The object to delete. |
timestampKind | TimestampKind | Kind of timestamp to apply on the WHERE clause. |
expectedTimestamp | DateTime | Timestamp that is expected to be on the database. |
Gets a domain model object of dataModelType looking for it's primary key.
public IDataModel GetModel(dataModelType, model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
dataModelType | Type | The Type of the domain model object to retrieve. |
model | IDataModel | An IDataModel holding the primary key to look for. |
Gets a model object of type
public GetModel<T>(model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
model | T | An instance of the model object with the primary key data. |
Gets a domain model object of dataModelType looking for it's primary key.
public Task<IDataModel> GetModelAsync(dataModelType, model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
dataModelType | Type | The Type of the domain model object to retrieve. |
model | IDataModel | An IDataModel holding the primary key to look for. |
Gets a model object of type
public Task GetModelAsync<T>(model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
model | T | An instance of the model object with the primary key data. |
Gets a domain model object of dataModelType looking for it's identity property.
public IDataModel GetModelByIdentity(dataModelType, model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
dataModelType | Type | The Type of the domain model object to retrieve. |
model | IDataModel | An IDataModel holding the identity to look for. |
Gets a model object of type
public GetModelByIdentity<T>(model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
model | T | An instance of the model object with the identity data. |
Gets a domain model object of dataModelType looking for it's identity property.
public Task<IDataModel> GetModelByIdentityAsync(dataModelType, model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
dataModelType | Type | The Type of the domain model object to retrieve. |
model | IDataModel | An IDataModel holding the identity to look for. |
Gets a model object of type T looking for the identity field in the underlying table.
public Task GetModelByIdentityAsync<T>(model)
An initialized data model object.
Name | Type | Summary |
---|---|---|
model | T | An instance of the model object with the identity data. |
Inserts a record into the underlaying data source.
public Int32 Insert(model)
Amount of records affected.
Name | Type | Summary |
---|---|---|
model | IDataModel | The object to insert. |
Inserts a record into the underlaying data source.
public Task<Int32> InsertAsync(model)
Amount of records affected.
Name | Type | Summary |
---|---|---|
model | IDataModel | The object to insert. |
Updates a record in the underlaying data source.
public Int32 Update(model, timestampKind, expectedTimestamp)
Amount of records affected.
Name | Type | Summary |
---|---|---|
model | IDataModel | The object to update. |
timestampKind | TimestampKind | Kind of timestamp to apply on the WHERE clause. |
expectedTimestamp | DateTime | Timestamp that is expected to be on the database. |
Updates a record in the underlaying data source.
public Task<Int32> UpdateAsync(model, timestampKind, expectedTimestamp)
Amount of records affected.
Name | Type | Summary |
---|---|---|
model | IDataModel | The object to update. |
timestampKind | TimestampKind | Kind of timestamp to apply on the WHERE clause. |
expectedTimestamp | DateTime | Timestamp that is expected to be on the database. |
In this document