=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -10,6 +10,7 @@ namespace adas_core.Infrastructure.Repositories;
|
||||
/// <summary>
|
||||
/// Represents a MongoDB repository for <see cref="ServiceConfig"/> entities, implementing the <see cref="IServiceConfigRepository"/> contract to provide data access operations.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=1c7de6e -->
|
||||
public class ServiceConfigRepository : MongoRepository<ServiceConfig>, IServiceConfigRepository
|
||||
{
|
||||
private readonly ApiSettings _apiSettings;
|
||||
@@ -33,6 +34,7 @@ public class ServiceConfigRepository : MongoRepository<ServiceConfig>, IServiceC
|
||||
/// Retrieves the service configuration collection name from API settings, falling back to the default "service_config" when no value is configured.
|
||||
/// </summary>
|
||||
/// <returns>The configured service collection name, or the default "service_config" when the API setting is null.</returns>
|
||||
/// <!-- aidoc:v1 sig=94e22ff body=8cab977 -->
|
||||
public override string GetCollectionName()
|
||||
{
|
||||
return _apiSettings.ServiceConfig ?? "service_config";
|
||||
@@ -44,6 +46,7 @@ public class ServiceConfigRepository : MongoRepository<ServiceConfig>, IServiceC
|
||||
/// </summary>
|
||||
/// <param name="id">The string identifier used to look up the service configuration.</param>
|
||||
/// <returns>A task that represents the asynchronous operation, containing the matching <see cref="ServiceConfig"/> or <c>null</c> if not found.</returns>
|
||||
/// <!-- aidoc:v1 sig=ea95853 body=ad0ec9c -->
|
||||
public async Task<ServiceConfig?> FindById(string id)
|
||||
{
|
||||
var result = await Collection.FindAsync(Builders<ServiceConfig>.Filter.Eq(x => x.StrId, id));
|
||||
@@ -56,6 +59,7 @@ public class ServiceConfigRepository : MongoRepository<ServiceConfig>, IServiceC
|
||||
/// </summary>
|
||||
/// <param name="oid">The <see cref="ObjectId"/> of the <see cref="ServiceConfig"/> to locate.</param>
|
||||
/// <returns>A <see cref="ServiceConfig"/> instance if a document with the given identifier is found; otherwise, <see langword="null"/>.</returns>
|
||||
/// <!-- aidoc:v1 sig=66de090 body=218bdce -->
|
||||
public async Task<ServiceConfig?> FindById(ObjectId oid)
|
||||
{
|
||||
var result = await Collection.FindAsync(Builders<ServiceConfig>.Filter.Eq(x => x.Id, oid));
|
||||
|
||||
Reference in New Issue
Block a user