rama creada apartir de master en j

This commit is contained in:
jrojas
2026-06-26 10:29:23 +02:00
parent 319fd3dfb0
commit c1517fda87
2810 changed files with 1927392 additions and 25392 deletions
@@ -6,6 +6,9 @@ using MongoDB.Driver;
namespace adas_core.Infrastructure.Repositories;
/// <summary>
/// Provides a MongoDB-backed repository implementation for PoCMapping entities.
/// </summary>
public class PoCMappingRepository : MongoRepository<PoCMapping>, IPoCMappingRepository
{
private readonly ApiSettings _apiSettings;
@@ -15,13 +18,22 @@ public class PoCMappingRepository : MongoRepository<PoCMapping>, IPoCMappingRepo
_apiSettings = apiSettings.Value;
} //For testing
/// <summary>
/// Retrieves the name of the mappings collection from the API settings configuration.
/// </summary>
/// <returns>The mappings collection name as configured in <c>_apiSettings</c>.</returns>
public override string GetCollectionName()
{
return _apiSettings.Mappings;
}
/// <summary>
/// Asynchronously retrieves a <see cref="PoCMapping"/> from the underlying MongoDB collection by matching its <see cref="PoCMapping.Id"/> against the supplied key, returning <c>null</c> when no matching document is found.
/// </summary>
/// <param name="key">The unique identifier (Id) of the <see cref="PoCMapping"/> to look up.</param>
/// <returns>A Task TResult containing the matching PoCMapping, or <c>null</c> if no document with the specified key exists in the collection.</returns>
public async Task<PoCMapping?> FindByKey(string key)
{
var filterBuilder = Builders<PoCMapping>.Filter;