# Interface ILightBeaconRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface ILightBeaconRepository : IMongoRepository<LightBeacon>

Inherited Members
  IMongoRepository<LightBeacon>.Collection
  IMongoRepository<LightBeacon>.GetCollectionName()
  IMongoRepository<LightBeacon>.InsertOneAsync(LightBeacon)
  IMongoRepository<LightBeacon>.DeleteAsync(ObjectId)
  IMongoRepository<LightBeacon>.UpdateOneAsync(ObjectId, LightBeacon)

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Methods

### GetById(ObjectId)

Retrieves a light beacon by its associated relay identifier.

    Task<LightBeacon?> GetById(ObjectId relayId)

#### Parameters

`relayId` ObjectId

  The 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 `null` if no beacon is found for the specified relay.

### GetByName(string)

Asynchronously retrieves a LightBeacon by its name.

    Task<LightBeacon?> GetByName(string name)

#### Parameters

`name` string

  The name of the light beacon to look up.

#### Returns

Task<LightBeacon>

  A task that returns the matching LightBeacon, or `null` if 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

`configurationRelayList` List<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

`filter` PaginationFilter

  The 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

`textToSearch` string

  The 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

`beacon` LightBeacon

  The LightBeacon entity to insert.

#### Returns

Task<LightBeacon>

  A task containing the inserted LightBeacon, or null when no entity was returned by the underlying operation.