Interface IRelayRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IRelayRepository : IMongoRepository<Relay>
- Inherited Members
- Extension Methods
Methods
GetById(ObjectId)
Asynchronously retrieves a relay entity by its unique identifier.
Task<Relay?> GetById(ObjectId relayId)
Parameters
relayIdObjectIdThe unique identifier of the relay to retrieve.
Returns
- Task<Relay>
A task that represents the asynchronous operation. The task result contains the Relay if found; otherwise,
null.
GetByName(string?)
Retrieves a relay by its name asynchronously, returning null if no matching relay is found.
Task<Relay?> GetByName(string? requestRelayName)
Parameters
requestRelayNamestringThe name of the relay to look up. May be null.
Returns
- Task<Relay>
A task that represents the asynchronous lookup. The task result contains the matching relay, or null if no relay with the specified name exists.
GetPaginatedRelays(PaginationFilter)
Retrieves a paginated, filterable query of relays based on the specified pagination filter.
IFindFluent<Relay, Relay> GetPaginatedRelays(PaginationFilter filter)
Parameters
filterPaginationFilterThe pagination filter used to control paging and additional query criteria for the relay lookup.
Returns
- IFindFluent<Relay, Relay>
An MongoDB.Driver.IFindFluent<TDocument, TProjection> representing the paginated query that can be further refined and executed.
GetRelayByTypeInList(List<ObjectId>, Type)
Retrieves the relays of the specified type from the provided configuration relay list.
List<Relay> GetRelayByTypeInList(List<ObjectId> configurationRelayList, RelayEnum.Type type)
Parameters
configurationRelayListList<ObjectId>The list of relay object identifiers to search through.
typeRelayEnum.TypeThe relay type used to filter the configuration relay list.
Returns
- List<Relay>
A list of relays matching the specified type; an empty list if no relays of that type are found.
GetRelayInList(List<ObjectId>)
Retrieves the Relay objects that correspond to the supplied configuration relay identifiers.
List<Relay> GetRelayInList(List<ObjectId> configurationRelayList)
Parameters
configurationRelayListList<ObjectId>The list of MongoDB.Bson.ObjectId values identifying the configuration relays to look up.
Returns
- List<Relay>
A List<T> containing the relays that match the provided configuration relay identifiers.
InsertOneRelayAsync(Relay)
Asynchronously inserts a single Relay record and returns the inserted entity, or null if the insertion did not produce a result.
Task<Relay?> InsertOneRelayAsync(Relay request)
Parameters
Returns
- Task<Relay>
A task that represents the asynchronous insert operation. The result is the inserted Relay, or null when no relay is returned.
UpdateRelayAsync(ObjectId, Relay)
Updates an existing relay identified by the specified object identifier.
Task<Relay?> UpdateRelayAsync(ObjectId objectId, Relay relay)
Parameters
objectIdObjectIdThe unique identifier of the relay to update.
relayRelayThe relay object containing the updated information.