IDataModel

Allows the implementation of domain model objects.

Namespace:
Inetdev.Data
Type:
Interface
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
Yes

Events

Type Name Summary
AfterEraseEventHandler AfterErase AfterErase event is fired after that the Erase method is executed.
AfterSaveEventHandler AfterSave AfterSave event is fired after that the Save method is executed.
BeforeEraseEventHandler BeforeErase BeforeErase event is fired before that the Erase method is executed.
BeforeSaveEventHandler BeforeSave BeforeSave event is fired before that the Save method is executed.

Properties

ColumnPropertyMappings

Column/property map.

Signature:
public ColumnPropertyMappings ColumnPropertyMappings { get; set; }

CurrentAction

Gets the DataAction that is currently performed on this object.

Signature:
public DataAction CurrentAction { get; }

DataProperties

A collection of data properties.

Signature:
public IDictionary<String, IDataProperty> DataProperties { get; }

DataServices

Get or set the data services object.

Signature:
public IDataServices DataServices { get; set; }

EnforceModelValidation

Get whether the validation of the object must be enforced.

Signature:
public Boolean EnforceModelValidation { get; }

Identity

Get or set an object that manages the generation of identity fields values.

Signature:
public IIdentity Identity { get; set; }

Item

Get or set data properties.

Signature:
public Object Item { get; set; }

Modified

Get whether the object has been modified.

Signature:
public Boolean Modified { get; }

Numerator

Get or set an object that manages the generation of numerator fields values.

Signature:
public INumerator Numerator { get; set; }

Sequencer

Get or set an object that manages the generation of sequence fields values.

Signature:
public ISequencer Sequencer { get; set; }

Validator

Get or set the data validator object.

Signature:
public IDataModelValidator Validator { get; set; }

Methods

Clear

Clears the contents of the object.

Signature:
public Void Clear()

Erase

Erases an object by issuing a delete command to the underlaying data source, automatically applying concurrency check when possible.

Signature:
public Void Erase()

Erase

Erases an object by issuing a delete command to the underlaying data source.

Signature:
public Void Erase(concurrency)
Parameters
Name Type Summary
concurrency ConcurrencyMode Mode of concurrency to apply to the erase action.

EraseAsync

Erases an object by issuing a delete command to the underlaying data source, automatically applying concurrency check when possible.

Signature:
public Task EraseAsync()

EraseAsync

Erases an object by issuing a delete command to the underlaying data source.

Signature:
public Task EraseAsync(concurrency)
Parameters
Name Type Summary
concurrency ConcurrencyMode Mode of concurrency to apply to the erase action.

Fill

Fill this object with the contents of the specified DataRow object.

Signature:
public Void Fill(row)
Parameters
Name Type Summary
row DataRow The DataRow object.

GetDataPropertyValue

Returns the value of the internal property field.

Signature:
public Object GetDataPropertyValue(property)
Returns

The value of the property field.

Parameters
Name Type Summary
property String The property to get it's internal value.

HasData

Test if a data property has data.

Signature:
public Boolean HasData(property)
Returns

True if the property has data.

Parameters
Name Type Summary
property String The name of the property.

IsModified

Test if a data property has been modified.

Signature:
public Boolean IsModified(property)
Returns

True if the property has been modified.

Parameters
Name Type Summary
property String The name of the property.

Save

Saves the object by issuing an insert or update command based on the specified action, automatically applying concurrency check when possible.

Signature:
public Void Save(action)
Parameters
Name Type Summary
action DataAction The action to execute.

Save

Saves the object by issuing an insert or update command based on the specified action.

Signature:
public Void Save(action, concurrency)
Parameters
Name Type Summary
action DataAction The action to execute.
concurrency ConcurrencyMode Concurrency mode to apply.

SaveAsync

Saves the object by issuing an insert or update command based on the specified action, automatically applying concurrency check when possible.

Signature:
public Task SaveAsync(action)
Parameters
Name Type Summary
action DataAction The action to execute.

SaveAsync

Saves the object by issuing an insert or update command based on the specified action.

Signature:
public Task SaveAsync(action, concurrency)
Parameters
Name Type Summary
action DataAction The action to execute.
concurrency ConcurrencyMode Concurrency mode to apply.

SetDataPropertyValue

Sets the value od the internal property field.

Signature:
public Void SetDataPropertyValue(property, value)
Parameters
Name Type Summary
property String The property to set it's internal value.
value Object The new value for the property.

Validate

Validates this object.

Signature:
public Void Validate()