Interface ILightBeaconRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface ILightBeaconRepository : IMongoRepository<LightBeacon>
- Inherited Members
- Extension Methods
Methods
GetById(ObjectId)
Retrieves a light beacon by its associated relay identifier.
Task<LightBeacon?> GetById(ObjectId relayId)
Parameters
relayIdObjectIdThe unique identifier of the relay used to look up the corresponding light beacon.
Returns
- Task<LightBeacon>
A task that represents the asynchronous operation. The task result contains the matching LightBeacon, or
nullif no beacon is found for the specified relay.
GetByName(string)
Asynchronously retrieves a LightBeacon by its name.
Task<LightBeacon?> GetByName(string name)
Parameters
namestringThe name of the light beacon to look up.
Returns
- Task<LightBeacon>
A task that returns the matching LightBeacon, or
nullif no beacon with the specified name is found.
GetLightBeaconInList(List<ObjectId>)
Retrieves the list of LightBeacon objects associated with the specified configuration relay identifiers.
List<LightBeacon> GetLightBeaconInList(List<ObjectId> configurationRelayList)
Parameters
configurationRelayListList<ObjectId>The collection of configuration relay MongoDB.Bson.ObjectId values used to look up the corresponding light beacons.
Returns
- List<LightBeacon>
A List<T> containing the light beacons matching the provided configuration relay identifiers; returns an empty list if no matches are found.
GetPaginatedRelays(PaginationFilter)
Retrieves a paginated, queryable collection of light beacons (relays) based on the supplied pagination filter.
IFindFluent<LightBeacon, LightBeacon> GetPaginatedRelays(PaginationFilter filter)
Parameters
filterPaginationFilterThe pagination filter that controls paging parameters applied to the relay list.
Returns
- IFindFluent<LightBeacon, LightBeacon>
An MongoDB.Driver.IFindFluent<TDocument, TProjection> exposing the paginated relay result set for further querying or enumeration.
GetSearchByName(string)
Asynchronously retrieves a list of LightBeacon objects whose name matches the specified search text.
Task<List<LightBeacon>> GetSearchByName(string textToSearch)
Parameters
textToSearchstringThe text used to search for matching LightBeacon entries by name.
Returns
- Task<List<LightBeacon>>
A task that represents the asynchronous operation, containing a list of LightBeacon objects that match the search criteria.
InsertOneAsyncAndReturn(LightBeacon)
Asynchronously inserts a new LightBeacon and returns the persisted entity, or null if the insertion did not produce a result.
Task<LightBeacon?> InsertOneAsyncAndReturn(LightBeacon beacon)
Parameters
beaconLightBeaconThe LightBeacon entity to insert.
Returns
- Task<LightBeacon>
A task containing the inserted LightBeacon, or null when no entity was returned by the underlying operation.