# Interface IServiceConfigRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface IServiceConfigRepository : IMongoRepository<ServiceConfig>

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

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

## Methods

### FindById(ObjectId)

Asynchronously retrieves a ServiceConfig by its unique MongoDB.Bson.ObjectId. Returns `null` when no matching service configuration is found.

    Task<ServiceConfig?> FindById(ObjectId oid)

#### Parameters

`oid` ObjectId

  The unique identifier of the service configuration to look up.

#### Returns

Task<ServiceConfig>

  A ServiceConfig matching the provided identifier, or `null` if no configuration exists for that id.

### FindById(string)

Retrieves a ServiceConfig by its identifier, returning null when no matching configuration is found.

    Task<ServiceConfig?> FindById(string id)

#### Parameters

`id` string

  The unique identifier of the service configuration to look up.

#### Returns

Task<ServiceConfig>

  A task that resolves to the matching ServiceConfig, or null if no configuration exists for the given id.