IRepositoryService<TModel> in assembly SanteDB.Core.Api version 3.0.1980.0
Summary
Represents a repository service
Description
In the the repository service layer is the layer responsible for coordinating business rules, privacy, auditing, and other activities from the messaging or other services in the SanteDB iCDR or dCDR.
Repository services should be the primary method of interacting with the SanteDB server infrastructure, as it indicates a user, application or device process is not intending to modify underlying persistence data directly (as would be the case for a system process), rather it wishes SanteDB to execute all validation and rules as normal.
Operations
Operation
Response/Return
Input/Parameter
Description
Get
TModel
Guidkey
Gets the specified model data
Get
TModel
GuidkeyGuidversionKey
Gets the specified model data
Find
IQueryResultSet<TModel>
Expression<Func<TModel,Boolean>>query
Finds the specified data where the current version matches the query provided
Insert
TModel
TModeldata
Inserts the specified model information
Save
TModel
TModeldata
Inserts or updates the specified data
Delete
TModel
Guidkey
Delete the object according to the current or according to server configuration
Implementations
AmiUpstreamRepository<TModel> - (SanteDB.Client)
HDSI upstream repository
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
Wrapped upstream repository for AMI which uses the ISecurityEntityWrapper
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
HdsiUpstreamRepository<TModel> - (SanteDB.Client)
HDSI upstream repository
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
A generic implementation that calls the upstream for fetching data
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
Generic local concept repository with sufficient permissions
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
Local Repository Service - (SanteDB.Core.Api)
Represents a base class for entity repository services
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly
Default Audit Repository - (SanteDB.Core.Api)
Represents an audit repository which stores and queries audit data.
/// Example Implementation
using SanteDB.Core.Services;
/// Other usings here
public class MyRepositoryService<TModel> : SanteDB.Core.Services.IRepositoryService<TModel> {
public String ServiceName => "My own IRepositoryService`1 service";
/// <summary>
/// Gets the specified model data
/// </summary>
public TModel Get(Guid key){
throw new System.NotImplementedException();
}
/// <summary>
/// Gets the specified model data
/// </summary>
public TModel Get(Guid key,Guid versionKey){
throw new System.NotImplementedException();
}
/// <summary>
/// Finds the specified data where the current version matches the query provided
/// </summary>
public IQueryResultSet<TModel> Find(Expression<Func<TModel,Boolean>> query){
throw new System.NotImplementedException();
}
/// <summary>
/// Inserts the specified model information
/// </summary>
public TModel Insert(TModel data){
throw new System.NotImplementedException();
}
/// <summary>
/// Inserts or updates the specified data
/// </summary>
public TModel Save(TModel data){
throw new System.NotImplementedException();
}
/// <summary>
/// Delete the object according to the current or according to server configuration
/// </summary>
public TModel Delete(Guid key){
throw new System.NotImplementedException();
}
}
References
Represents a which uses database persistence layer to store / retrieve mail messages within the system
An implementation of the that loads definitions from applets