Table of Contents

Interface INoticeRepository

Namespace
adas_core.Application.Repositories.Interfaces
Assembly
adas-core.Application.dll
public interface INoticeRepository : IMongoRepository<Notice>
Inherited Members
Extension Methods

Methods

Delete(ObjectId)

Deletes the entity identified by the specified MongoDB.Bson.ObjectId.

Task Delete(ObjectId id)

Parameters

id ObjectId

The MongoDB.Bson.ObjectId of the entity to delete.

Returns

Task

FindAll()

Asynchronously retrieves all notices.

Task<IEnumerable<Notice>> FindAll()

Returns

Task<IEnumerable<Notice>>

A task that represents the asynchronous operation. The task result contains an enumerable collection of all Notice objects.

FindByDate(DateTime)

Asynchronously retrieves the collection of notices that match the specified date.

Task<IEnumerable<Notice>?> FindByDate(DateTime date)

Parameters

date DateTime

The date used to filter the notices to be retrieved.

Returns

Task<IEnumerable<Notice>>

A task that represents the asynchronous operation. The task result contains a collection of Notice objects for the specified date, or null if no matching notices are found.

FindByDisplayId(ObjectId)

Asynchronously retrieves the Notice entities associated with the specified display identifier.

Task<IEnumerable<Notice>?> FindByDisplayId(ObjectId displayId)

Parameters

displayId ObjectId

The display identifier used to locate the matching notices.

Returns

Task<IEnumerable<Notice>>

A task that yields the collection of matching Notice items, or null if no notices are found.

FindById(ObjectId)

Retrieves a Notice by its unique identifier. Returns null when no matching notice is found.

Task<Notice?> FindById(ObjectId id)

Parameters

id ObjectId

The identifier of the notice to look up.

Returns

Task<Notice>

A task that yields the matching Notice, or null if no notice exists for the specified id.

FindByType(string)

Asynchronously retrieves the Notice entries that match the specified type.

Task<IEnumerable<Notice>?> FindByType(string type)

Parameters

type string

The notice type used to filter the lookup.

Returns

Task<IEnumerable<Notice>>

A task containing the matching Notice items, or null when no results are available.

Update(Notice)

Asynchronously updates an existing notice with the provided information.

Task Update(Notice notice)

Parameters

notice Notice

The notice entity containing the updated data to be persisted.

Returns

Task