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
idObjectIdThe MongoDB.Bson.ObjectId of the entity to delete.
Returns
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
dateDateTimeThe 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
nullif 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
displayIdObjectIdThe display identifier used to locate the matching notices.
Returns
- Task<IEnumerable<Notice>>
A task that yields the collection of matching Notice items, or
nullif 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
idObjectIdThe identifier of the notice to look up.
Returns
- Task<Notice>
A task that yields the matching Notice, or
nullif no notice exists for the specifiedid.
FindByType(string)
Asynchronously retrieves the Notice entries that match the specified type.
Task<IEnumerable<Notice>?> FindByType(string type)
Parameters
typestringThe notice type used to filter the lookup.
Returns
- Task<IEnumerable<Notice>>
A task containing the matching Notice items, or
nullwhen no results are available.
Update(Notice)
Asynchronously updates an existing notice with the provided information.
Task Update(Notice notice)
Parameters
noticeNoticeThe notice entity containing the updated data to be persisted.