# Interface IConfigPumpsRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface IConfigPumpsRepository : IMongoRepository<ConfigPumps>

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

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

## Methods

### DeleteConfig(ConfigPumps)

Asynchronously deletes the specified pump configuration.

    Task<bool> DeleteConfig(ConfigPumps config)

#### Parameters

`config` ConfigPumps

  The pump configuration to delete.

#### Returns

Task<bool>

  A task that represents the asynchronous operation. The task result contains `true` if the configuration was successfully deleted; otherwise, `false`.

### FindById(string)

Asynchronously retrieves a ConfigPumps configuration by its unique identifier. Returns null when no matching configuration is found.

    Task<ConfigPumps?> FindById(string id)

#### Parameters

`id` string

  The unique identifier of the configuration to look up.

#### Returns

Task<ConfigPumps>

  A task that yields the matching ConfigPumps instance, or null if no configuration is found for the specified id.

### GetAllConfigs()

Retrieves all pump configurations asynchronously.

    Task<List<ConfigPumps>?> GetAllConfigs()

#### Returns

Task<List<ConfigPumps>>

  A task that represents the asynchronous operation, containing a list of ConfigPumps if found, or `null` if no configurations are available.

### UpdateConfig(ConfigPumps)

Updates the pumps configuration using the supplied `config` instance.

    Task<ConfigPumps?> UpdateConfig(ConfigPumps config)

#### Parameters

`config` ConfigPumps

  The pumps configuration to be persisted.

#### Returns

Task<ConfigPumps>

  A task that resolves to the updated ConfigPumps instance, or null if the configuration could not be found.