TreeRepositoryService
Data access layer (DAL) interface to implements for any repository service. This layer helps to separate the business logic (service layer) from accessing the ORM directly and allows to switch to another ORM without changing the business logic.
Type parameters
T
objectRequiredMethods
create
Parameters
data
unknownRequiredcontext
ContextReturns
Promise
Promise<T>Requireddelete
Parameters
id
stringRequiredcontext
ContextReturns
Promise
Promise<void>Requiredfind
Parameters
Returns
Promise
Promise<T[]>RequiredfindAndCount
Parameters
Returns
Promise
Promise<[T[], number]>RequiredgetActiveManager
Returns
getFreshManager
Returns
serialize
Parameters
data
anyRequiredoptions
anyReturns
Promise
Promise<TOutput>Requiredtransaction
Parameters
task
(transactionManager: TManager) => Promise<any>Requiredcontext
objectcontext.enableNestedTransactions
booleancontext.isolationLevel
stringcontext.transaction
TManagerReturns
Promise
Promise<any>RequiredWas this section helpful?