Table of Contents

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
PoCMappingRepository
Implements
Inherited Members
Extension Methods

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.