# Class PoCMappingRepository

Namespace
  adas_core.Infrastructure.Repositories

Assembly
  adas-core.Infrastructure.dll

Provides a MongoDB-backed repository implementation for PoCMapping entities.

    public class PoCMappingRepository : MongoRepository<PoCMapping>, IMongoRepository<PoCMapping>, IPoCMappingRepository

Inheritance
  object
  MongoRepository<PoCMapping>
  PoCMappingRepository

Implements
  IMongoRepository<PoCMapping>
  IPoCMappingRepository

Inherited Members
  MongoRepository<PoCMapping>.Db
  MongoRepository<PoCMapping>.Collection
  MongoRepository<PoCMapping>.InsertOneAsync(PoCMapping)
  MongoRepository<PoCMapping>.UpdateOneAsync(ObjectId, PoCMapping)
  MongoRepository<PoCMapping>.DeleteAsync(ObjectId)
  MongoRepository<PoCMapping>.CreateIndexes()
  MongoRepository<PoCMapping>.InsertInitialLoad()
  MongoRepository<PoCMapping>.InsertManyAsync(List<PoCMapping>)
  MongoRepository<PoCMapping>.UpdateManyObjectIdAsync(string, ObjectId, ObjectId)
  MongoRepository<PoCMapping>.DeleteAsync(string)
  MongoRepository<PoCMapping>.CollectionExists(string)
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

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

## Constructors

### PoCMappingRepository(IOptions<ApiSettings>, IMongoDatabase)

    public PoCMappingRepository(IOptions<ApiSettings> apiSettings, IMongoDatabase database)

#### Parameters

`apiSettings` IOptions<ApiSettings>
`database` IMongoDatabase

## Methods

### FindByKey(string)

Asynchronously retrieves a PoCMapping from the underlying MongoDB collection by matching its Id against the supplied key, returning `null` when no matching document is found.

    public Task<PoCMapping?> FindByKey(string key)

#### Parameters

`key` string

  The unique identifier (Id) of the PoCMapping to look up.

#### Returns

Task<PoCMapping>

  A Task TResult containing the matching PoCMapping, or `null` if no document with the specified key exists in the collection.

### GetCollectionName()

Retrieves the name of the mappings collection from the API settings configuration.

    public override string GetCollectionName()

#### Returns

string

  The mappings collection name as configured in `_apiSettings`.