Interface IDeviceRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDeviceRepository : IMongoRepository<Device>
- Inherited Members
- Extension Methods
Methods
FindByKey(string)
Retrieves a device by its unique key identifier.
Task<Device?> FindByKey(string deviceDtoKey)
Parameters
deviceDtoKeystringThe key identifier of the device to look up.
Returns
- Task<Device>
A task that represents the asynchronous operation. The task result contains the Device if a matching device is found, or
nullif no device corresponds to the specified key.
FindByMacAddr(string)
Asynchronously retrieves a device matching the specified MAC address, returning null if no matching device is found.
Task<Device?> FindByMacAddr(string deviceDtoMacAddr)
Parameters
deviceDtoMacAddrstringThe MAC address used to look up the device.
Returns
- Task<Device>
A task that represents the asynchronous operation, containing the matching Device or null when no device is found.
FindBySerialNumber(string)
Finds and returns the device matching the specified serial number, or null if no matching device is found.
Task<Device?> FindBySerialNumber(string deviceDtoSerialNumber)
Parameters
deviceDtoSerialNumberstringThe serial number used to look up the device.
Returns
FindByUuid(string)
Asynchronously finds a device by its unique identifier (UUID) and returns the matching device, or null if no device is found.
Task<Device?> FindByUuid(string deviceDtoUuid)
Parameters
deviceDtoUuidstringThe UUID string used to look up the device.
Returns
- Task<Device>
A Task<TResult> that resolves to the matching Device, or null when no device matches the provided UUID.
UpdateDeviceStats(ObjectId, DeviceDto)
Updates the statistics of an existing device identified by the specified identifier.
Task UpdateDeviceStats(ObjectId id, DeviceDto deviceExist)
Parameters
idObjectIdThe unique identifier of the device whose statistics will be updated.
deviceExistDeviceDtoThe device data transfer object representing the existing device to be updated.
Returns
- Task
A task that represents the asynchronous update operation.