Interface ICameraRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface ICameraRepository : IMongoRepository<Camera>
- Inherited Members
- Extension Methods
Methods
GetById(ObjectId)
Asynchronously retrieves a Camera by its unique identifier.
Task<Camera?> GetById(ObjectId cameraId)
Parameters
cameraIdObjectIdThe unique identifier of the camera to look up.
Returns
- Task<Camera>
A task that represents the asynchronous operation. The task result contains the matching Camera, or
nullif no camera is found with the specified identifier.
GetByName(string)
Asynchronously retrieves a camera by its name, returning null if no matching camera is found.
Task<Camera?> GetByName(string name)
Parameters
namestringThe name of the camera to look up.
Returns
- Task<Camera>
A Task<TResult> that resolves to the matching Camera, or
nullif no camera with the specified name exists.
GetCameraInList(List<ObjectId>)
Retrieves the list of Camera objects associated with the specified configuration relays.
List<Camera> GetCameraInList(List<ObjectId> configurationRelayList)
Parameters
configurationRelayListList<ObjectId>The list of MongoDB.Bson.ObjectId values identifying the configuration relays whose cameras should be returned.
Returns
- List<Camera>
A List<T> containing the cameras linked to the provided configuration relays; returns an empty list when no matching cameras are found.
GetPaginatedCameras(PaginationFilter)
Retrieves a paginated, fluent queryable collection of cameras based on the supplied pagination filter.
IFindFluent<Camera, Camera> GetPaginatedCameras(PaginationFilter request)
Parameters
requestPaginationFilterThe pagination filter containing the page number and page size used to page the camera results.
Returns
- IFindFluent<Camera, Camera>
An MongoDB.Driver.IFindFluent<TDocument, TProjection> representing the paged query of cameras.
GetSearchByNameCameras(string)
Asynchronously searches for cameras whose name matches the specified text.
Task<List<Camera>> GetSearchByNameCameras(string textToSearch)
Parameters
textToSearchstringThe text used to filter cameras by name.
Returns
- Task<List<Camera>>
A task that represents the asynchronous operation, containing a list of Camera objects matching the search criteria.
InsertOneCamera(Camera)
Inserts a new camera record into the data store and returns the persisted entity, or null if the camera could not be inserted.
Task<Camera?> InsertOneCamera(Camera camera)
Parameters
Returns
- Task<Camera>
A Task<TResult> that resolves to the inserted Camera, or
nullwhen the insertion is not performed.
UpdateCameraAsync(ObjectId, Camera)
Asynchronously updates an existing camera identified by the specified object identifier.
Task<Camera?> UpdateCameraAsync(ObjectId objectId, Camera camera)
Parameters
objectIdObjectIdThe unique identifier of the camera to update.
cameraCameraThe camera object containing the updated information.