Interface IHistoricalConfigChangesRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IHistoricalConfigChangesRepository : IMongoRepository<HistoricalConfigChanges>
- Inherited Members
- Extension Methods
Methods
Delete(ObjectId)
Deletes the historical configuration change record identified by the specified identifier, returning the removed entry when found.
If no record matches the given identifier, the task resolves to null.
Task<HistoricalConfigChanges?> Delete(ObjectId id)
Parameters
idObjectIdThe unique identifier of the historical configuration change to delete.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous delete operation, containing the deleted HistoricalConfigChanges record, or
nullif no matching record exists.
FindAll()
Asynchronously retrieves all historical configuration changes.
Task<ICollection<HistoricalConfigChanges>> FindAll()
Returns
- Task<ICollection<HistoricalConfigChanges>>
A task that represents the asynchronous operation. The task result contains a collection of HistoricalConfigChanges records.
FindAllIds()
Asynchronously retrieves a list of all object identifiers.
Task<List<ObjectId>> FindAllIds()
Returns
- Task<List<ObjectId>>
A task that represents the asynchronous operation. The task result contains a list of ObjectId values.
FindById(ObjectId)
Asynchronously retrieves a historical configuration changes record by its unique identifier. Returns null if no matching record is found.
Task<HistoricalConfigChanges?> FindById(ObjectId id)
Parameters
idObjectIdThe unique identifier of the historical configuration changes record to look up.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous operation. The task result contains the matching HistoricalConfigChanges record, or null if no record with the specified identifier exists.
FindLastHistoricalConfigChangesByType(ConfigTypes, int)
Retrieves the most recent historical configuration changes filtered by the specified configuration type, limited to a given number of entries.
Task<ICollection<HistoricalConfigChanges>> FindLastHistoricalConfigChangesByType(DisplayConfigEnums.ConfigTypes cfgType, int num = 10)
Parameters
cfgTypeDisplayConfigEnums.ConfigTypesThe configuration type used to filter the historical changes.
numintThe maximum number of recent changes to return. Defaults to 10.
Returns
- Task<ICollection<HistoricalConfigChanges>>
A task that returns a collection of historical configuration changes matching the specified type, ordered from most recent.
FindLastHistoricalConfigChangesByUser(string, ConfigTypes?, int)
Retrieves the most recent historical configuration changes for the specified user, optionally filtered by configuration type.
Task<ICollection<HistoricalConfigChanges>> FindLastHistoricalConfigChangesByUser(string user, DisplayConfigEnums.ConfigTypes? cfgType = null, int num = 10)
Parameters
userstringThe identifier of the user whose historical configuration changes are being retrieved.
cfgTypeDisplayConfigEnums.ConfigTypes?Optional. The configuration type to filter the results by. If null, changes across all configuration types are returned.
numintThe maximum number of historical changes to return. Defaults to 10.
Returns
- Task<ICollection<HistoricalConfigChanges>>
A task representing the asynchronous operation, containing a collection of historical configuration changes for the user.
InsertOneAsync(HistoricalConfigChanges)
Asynchronously inserts a new HistoricalConfigChanges record into the data store.
Task<HistoricalConfigChanges?> InsertOneAsync(HistoricalConfigChanges patientObservation)
Parameters
patientObservationHistoricalConfigChangesThe historical config change entity to insert.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous insert operation, containing the inserted HistoricalConfigChanges entity, or
nullif the insertion did not produce a result.
Update(HistoricalConfigChanges)
Updates an existing historical config change record asynchronously.
Task<HistoricalConfigChanges?> Update(HistoricalConfigChanges historicalConfigChange)
Parameters
historicalConfigChangeHistoricalConfigChangesThe historical config change entity containing the values to persist.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous update operation. The result is the updated historical config change, or
nullif the record was not found.