# Interface IDisplayCardConfigRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface IDisplayCardConfigRepository : IMongoRepository<CardConfig>

Inherited Members
  IMongoRepository<CardConfig>.Collection
  IMongoRepository<CardConfig>.GetCollectionName()
  IMongoRepository<CardConfig>.InsertOneAsync(CardConfig)
  IMongoRepository<CardConfig>.DeleteAsync(ObjectId)
  IMongoRepository<CardConfig>.UpdateOneAsync(ObjectId, CardConfig)

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## 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

`configId` ObjectId

  The 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 `null` if 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

`configId` ObjectId

  The 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

`config` CardConfig

  The CardConfig instance to insert.

#### Returns

Task<CardConfig>

  A Task<TResult> that yields the inserted CardConfig, or `null` if 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

`config` CardConfig

  The CardConfig to update. May be `null` to indicate no update payload was provided.

#### Returns

Task<UpdateResponse<CardConfig>>

  A task that resolves to an UpdateResponse<T> containing the updated CardConfig, or `null` if no matching record was found.