Class RepositoryBase<T>
Base class for data repositories.
Inheritance
System.Object
RepositoryBase<T>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: TcOpen.Inxton.Data.dll
Syntax
public abstract class RepositoryBase<T> : IRepository<T>, IRepository where T : IBrowsableDataObject
Type Parameters
Name |
Description |
T |
Type of data object.
|
Fields
|
Improve this Doc
View Source
mutex
Declaration
Field Value
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
onCreate
Declaration
OnCreateDelegate<T> onCreate
Field Value
|
Improve this Doc
View Source
onCreateDone
Declaration
OnCreateDoneDelegate<T> onCreateDone
Field Value
|
Improve this Doc
View Source
onCreateFailed
Declaration
OnCreateFailedDelegate<T> onCreateFailed
Field Value
|
Improve this Doc
View Source
onDelete
Declaration
OnDeleteDelegate onDelete
Field Value
|
Improve this Doc
View Source
onDeleteDone
Declaration
OnDeleteDoneDelegate onDeleteDone
Field Value
|
Improve this Doc
View Source
onDeleteFailed
Declaration
OnDeleteFailedDelegate onDeleteFailed
Field Value
|
Improve this Doc
View Source
onRead
Declaration
Field Value
|
Improve this Doc
View Source
onReadDone
Declaration
OnReadDoneDelegate<T> onReadDone
Field Value
|
Improve this Doc
View Source
onReadFailed
Declaration
OnReadFailedDelegate onReadFailed
Field Value
|
Improve this Doc
View Source
onUpdate
Declaration
OnUpdateDelegate<T> onUpdate
Field Value
|
Improve this Doc
View Source
onUpdateDone
Declaration
OnUpdateDoneDelegate<T> onUpdateDone
Field Value
|
Improve this Doc
View Source
onUpdateFailed
Declaration
OnUpdateFailedDelegate<T> onUpdateFailed
Field Value
Properties
|
Improve this Doc
View Source
Count
Gets the number of records/documents in the repository.
Declaration
public long Count { get; }
Property Value
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
CountNvi
Counts the records/documents in the repository. (Concrete implementation of given repository type)
Declaration
protected abstract long CountNvi { get; }
Property Value
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
OnCreate
Gets or sets delegate that executes prior to new entry into repository.
Declaration
public OnCreateDelegate<T> OnCreate { get; set; }
Property Value
|
Improve this Doc
View Source
OnCreateDone
Gets or sets delegate that executes after a new entry has been added sucesfully.
Declaration
public OnCreateDoneDelegate<T> OnCreateDone { get; set; }
Property Value
|
Improve this Doc
View Source
OnCreateFailed
Gets or sets delegate that executes after a new entry has NOT been added sucesfully.
Declaration
public OnCreateFailedDelegate<T> OnCreateFailed { get; set; }
Property Value
|
Improve this Doc
View Source
OnDelete
Gets or sets delegate that executes prior to deleting existing record.
Declaration
public OnDeleteDelegate OnDelete { get; set; }
Property Value
|
Improve this Doc
View Source
OnDeleteDone
Gets or sets delegate that executes after an entry has been deleted sucesfully.
Declaration
public OnDeleteDoneDelegate OnDeleteDone { get; set; }
Property Value
|
Improve this Doc
View Source
OnDeleteFailed
Gets or sets delegate that executes after an entry has NOT been deleted sucesfully.
Declaration
public OnDeleteFailedDelegate OnDeleteFailed { get; set; }
Property Value
|
Improve this Doc
View Source
OnRead
Gets or sets delegate that executes prior to new reading data from repository
Declaration
public OnReadDelegate OnRead { get; set; }
Property Value
|
Improve this Doc
View Source
OnReadDone
Gets or sets delegate that executes after an entry has been read sucesfully.
Declaration
public OnReadDoneDelegate<T> OnReadDone { get; set; }
Property Value
|
Improve this Doc
View Source
OnReadFailed
Gets or sets delegate that executes after an entry has NOT been read sucesfully.
Declaration
public OnReadFailedDelegate OnReadFailed { get; set; }
Property Value
|
Improve this Doc
View Source
OnRecordUpdateValidation
Declaration
public ValidateDataDelegate<T> OnRecordUpdateValidation { get; set; }
Property Value
|
Improve this Doc
View Source
OnUpdate
Gets or sets delegate that executes prior to updating existing record.
Declaration
public OnUpdateDelegate<T> OnUpdate { get; set; }
Property Value
|
Improve this Doc
View Source
OnUpdateDone
Gets or sets delegate that executes after an entry has been updated sucesfully.
Declaration
public OnUpdateDoneDelegate<T> OnUpdateDone { get; set; }
Property Value
|
Improve this Doc
View Source
OnUpdateFailed
Gets or sets delegate that executes after an entry has NOT been updated sucesfully.
Declaration
public OnUpdateFailedDelegate<T> OnUpdateFailed { get; set; }
Property Value
|
Improve this Doc
View Source
Queryable
Gets System.Linq.IQueryable of given repository.
Declaration
public abstract IQueryable<T> Queryable { get; }
Property Value
Type |
Description |
System.Linq.IQueryable<T> |
|
Methods
|
Improve this Doc
View Source
Create(String, T)
Creates a new record/document in the repository.
Declaration
public void Create(string identifier, T data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/repository
|
T |
data |
Data object.
|
|
Improve this Doc
View Source
CreateNvi(String, T)
Creates a new record/document in the repository. (Concrete implementation of given repository type)
Declaration
protected abstract void CreateNvi(string identifier, T data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/repository
|
T |
data |
Data object.
|
|
Improve this Doc
View Source
Delete(String)
Deletes an existing record/document. (Concrete implementation of given repository type)
Declaration
public void Delete(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/document to delete.
|
|
Improve this Doc
View Source
DeleteNvi(String)
Deletes an existing record/document. (Concrete implementation of given repository type)
Declaration
protected abstract void DeleteNvi(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/document to delete.
|
|
Improve this Doc
View Source
Exists(String)
Declaration
public bool Exists(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ExistsNvi(String)
Checks that the record with given identifier exists in the repository.
Declaration
protected abstract bool ExistsNvi(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Entity id to check for existence.
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
FilteredCount(String, eSearchMode)
Gets the count of the records/documents that contain given string in the identifier.
Declaration
public long FilteredCount(string identifierContent, eSearchMode searchMode)
Parameters
Type |
Name |
Description |
System.String |
identifierContent |
String required to be contained in the identifier of the records/documents.
|
eSearchMode |
searchMode |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
FilteredCountNvi(String, eSearchMode)
Counts records that contain given string in the id. (Concrete implementation of given repository type)
Declaration
protected abstract long FilteredCountNvi(string identifierContent, eSearchMode searchMode)
Parameters
Type |
Name |
Description |
System.String |
identifierContent |
String required to be contained in the identifier of the records/documents.
|
eSearchMode |
searchMode |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
GetRecords(String, Int32, Int32, eSearchMode)
Gets System.Collections.Generic.IEnumerable<T> of repository entries that match the identifier.
Declaration
public IEnumerable<T> GetRecords(string identifier, int limit = 10, int skip = 0, eSearchMode searchMode = eSearchMode.Exact)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.Int32 |
limit |
|
System.Int32 |
skip |
|
eSearchMode |
searchMode |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
|
Improve this Doc
View Source
GetRecordsNvi(String, Int32, Int32, eSearchMode)
Retrieves records/documents that contain given string in the identifier. (Concrete implementation of given repository type)
Declaration
protected abstract IEnumerable<T> GetRecordsNvi(string identifierContent, int limit, int skip, eSearchMode searchMode)
Parameters
Type |
Name |
Description |
System.String |
identifierContent |
String required to be contained in the identifier of records/documents.
|
System.Int32 |
limit |
Limit of documents to retrieve.
|
System.Int32 |
skip |
Number of documents to be skipped.
|
eSearchMode |
searchMode |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
|
Improve this Doc
View Source
Read(String)
Reads en existing record/document from the repository.
Declaration
public T Read(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/document to read.
|
Returns
Type |
Description |
T |
Retrieved data object.
|
|
Improve this Doc
View Source
ReadNvi(String)
Reads en existing record/document from the repository. (Concrete implementation of given repository type)
Declaration
protected abstract T ReadNvi(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/document to read.
|
Returns
Type |
Description |
T |
Retrieved data object.
|
|
Improve this Doc
View Source
Update(String, T)
Updates an existing record/document.
Declaration
public void Update(string identifier, T data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/document to update.
|
T |
data |
Data object with updated content.
|
|
Improve this Doc
View Source
UpdateNvi(String, T)
Updates an existing record/document. (Concrete implementation of given repository type)
Declaration
protected abstract void UpdateNvi(string identifier, T data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
Unique identifier of the record/document to update.
|
T |
data |
Data object with updated content.
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IRepository.Count
Declaration
long IRepository.Count { get; }
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
IRepository.Create(String, Object)
Declaration
void IRepository.Create(string identifier, object data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.Object |
data |
|
|
Improve this Doc
View Source
IRepository.Delete(String)
Declaration
void IRepository.Delete(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
|
Improve this Doc
View Source
IRepository.Read(String)
Declaration
dynamic IRepository.Read(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
IRepository.Update(String, Object)
Declaration
void IRepository.Update(string identifier, object data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.Object |
data |
|
Implements