Click or drag to resize

IDataPersistenceServiceTDataDelete Method

Delete the specified identified data

Namespace:  SanteDB.Core.Services
Assembly:  SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntax
TData Delete(
	Guid key,
	TransactionMode transactionMode,
	IPrincipal principal
)

Parameters

key
Type: SystemGuid
The identifier/key of the data to be deleted
transactionMode
Type: SanteDB.Core.ServicesTransactionMode
The transaction mode
principal
Type: System.Security.PrincipalIPrincipal
The principal which is deleting the data

Return Value

Type: TData

[Missing <returns> documentation for "M:SanteDB.Core.Services.IDataPersistenceService`1.Delete(System.Guid,SanteDB.Core.Services.TransactionMode,System.Security.Principal.IPrincipal)"]

Remarks

This method will attempt to delete data according to the currently scoped DataPersistenceControlContext.

LogicalDeleteThe persistence layer should attempt to logically delete the record. This means that the record should not appear in queries, nor direct retrieves
PermanentDeleteThe persistence layer should purge the data from the database

The DeleteMode is a suggestion to the persistence layer, generally the closest, most appropriate value is chosen based on:

  • Whether the TData class can be logically deleted (i.e. does it carry the necessary fields to support deletion)
  • Whether there are other references to the object
  • Whether the configuration for the persistence layer permits logical deletion
See Also