# Interface IDisplayChartConfigRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface IDisplayChartConfigRepository : IMongoRepository<ChartConfig>

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

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

## Methods

### DeleteOne(ObjectId)

Deletes a single chart configuration identified by its unique identifier. Returns the deleted configuration, or null if no matching configuration was found.

    Task<ChartConfig?> DeleteOne(ObjectId configId)

#### Parameters

`configId` ObjectId

  The unique identifier of the chart configuration to delete.

#### Returns

Task<ChartConfig>

  A task that resolves to the deleted ChartConfig, or null if no configuration with the specified id exists.

### GetAll()

Asynchronously retrieves all chart configurations.

    Task<List<ChartConfig>> GetAll()

#### Returns

Task<List<ChartConfig>>

  A task that represents the asynchronous operation, containing a list of ChartConfig objects.

### GetById(ObjectId)

Asynchronously retrieves a ChartConfig by its unique identifier, returning null if no matching configuration is found.

    Task<ChartConfig?> GetById(ObjectId configId)

#### Parameters

`configId` ObjectId

  The identifier of the chart configuration to look up.

#### Returns

Task<ChartConfig>

  A task that yields the matching ChartConfig, or null when no configuration exists for the specified id.

### InsertOneAsyncAndReturn(ChartConfig)

Asynchronously inserts a new chart configuration into the data store and returns the persisted entity, which may be null if no record is produced.

    Task<ChartConfig?> InsertOneAsyncAndReturn(ChartConfig config)

#### Parameters

`config` ChartConfig

  The chart configuration to insert.

#### Returns

Task<ChartConfig>

  A task that represents the asynchronous insert operation, containing the inserted ChartConfig or null when the operation yields no result.

### UpdateOne(ChartConfig?)

Updates a single chart configuration and returns the operation result wrapped in an update response.

    Task<UpdateResponse<ChartConfig?>> UpdateOne(ChartConfig? config)

#### Parameters

`config` ChartConfig

  The chart configuration to update. May be null.

#### Returns

Task<UpdateResponse<ChartConfig>>

  A task containing the update response with the updated chart configuration, which may be null.