Class ServiceConfigService
- Namespace
- adas_core.Application.Services
- Assembly
- adas-core.Application.dll
public class ServiceConfigService : IServiceConfigService
- Inheritance
-
ServiceConfigService
- Implements
- Inherited Members
- Extension Methods
Constructors
ServiceConfigService(IServiceConfigRepository, ILogger<ServiceConfigService>)
public ServiceConfigService(IServiceConfigRepository serviceConfigRepository, ILogger<ServiceConfigService> logger)
Parameters
serviceConfigRepositoryIServiceConfigRepositoryloggerILogger<ServiceConfigService>
Methods
Get(string)
Retrieves a ServiceConfig by its identifier, attempting lookup by the string id first and falling back to an MongoDB.Bson.ObjectId lookup when the initial query returns no result.
public Task<ServiceConfig?> Get(string id)
Parameters
idstringThe identifier of the service configuration to retrieve. May be a string id or a valid ObjectId representation.
Returns
- Task<ServiceConfig>
The matching ServiceConfig, or
nullwhen no record is found for the provided id.
Exceptions
- NotFoundException
Thrown when the resource cannot be found after attempting both the string id and the parsed MongoDB.Bson.ObjectId lookup.