Interface IDisplayCardConfigRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDisplayCardConfigRepository : IMongoRepository<CardConfig>
- Inherited Members
- Extension Methods
Methods
DeleteOne(ObjectId)
Deletes a single card configuration identified by the specified identifier, returning the removed configuration when found.
Task<CardConfig?> DeleteOne(ObjectId configId)
Parameters
configIdObjectIdThe unique identifier of the card configuration to delete.
Returns
- Task<CardConfig>
A task that represents the asynchronous delete operation. The task result contains the deleted CardConfig, or
nullif no configuration with the specified identifier exists.
GetAll()
Asynchronously retrieves all available card configurations.
Task<List<CardConfig>> GetAll()
Returns
- Task<List<CardConfig>>
A task that represents the asynchronous operation. The task result contains a list of all CardConfig items.
GetById(ObjectId)
Retrieves a card configuration by its unique identifier, returning null when no matching configuration is found.
Task<CardConfig?> GetById(ObjectId configId)
Parameters
configIdObjectIdThe unique identifier of the card configuration to look up.
Returns
- Task<CardConfig>
A Task<TResult> that yields the matching CardConfig if found; otherwise,
null.
InsertOneAsyncAndReturn(CardConfig)
Asynchronously inserts a new CardConfig into the data store and returns the persisted record, which may include database-generated values.
Task<CardConfig?> InsertOneAsyncAndReturn(CardConfig config)
Parameters
configCardConfigThe CardConfig instance to insert.
Returns
- Task<CardConfig>
A Task<TResult> that yields the inserted CardConfig, or
nullif the record could not be persisted.
UpdateOne(CardConfig?)
Updates a single CardConfig record based on the provided configuration.
Task<UpdateResponse<CardConfig?>> UpdateOne(CardConfig? config)
Parameters
configCardConfigThe CardConfig to update. May be
nullto indicate no update payload was provided.
Returns
- Task<UpdateResponse<CardConfig>>
A task that resolves to an UpdateResponse<T> containing the updated CardConfig, or
nullif no matching record was found.