Search Results for

    Show / Hide Table of Contents

    Class EventRepository

    Repository implementation for managing event entities and their database operations.

    Inheritance
    object
    EventRepository
    Implements
    IEventRepository
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.Core.Infrastructure.Repositories
    Assembly: OEMS.Core.dll
    Syntax
    public class EventRepository : IEventRepository

    Constructors

    EventRepository(IDbContextFactory<OEMSDBContext>)

    Initializes a new instance of the EventRepository class.

    Declaration
    public EventRepository(IDbContextFactory<OEMSDBContext> contextFactory)
    Parameters
    Type Name Description
    IDbContextFactory<OEMSDBContext> contextFactory

    The database context factory for data operations

    Methods

    AddAsync(Event)

    Neues Event anlegen.

    Declaration
    public Task AddAsync(Event ev)
    Parameters
    Type Name Description
    Event ev
    Returns
    Type Description
    Task

    AddProcessAsync(EventProcess)

    Adds a new process to an event.

    Declaration
    public Task AddProcessAsync(EventProcess proc)
    Parameters
    Type Name Description
    EventProcess proc

    The event process entity to add.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    AddProcessStepAsync(EventProcessStep)

    Adds a new process step to an event process.

    Declaration
    public Task AddProcessStepAsync(EventProcessStep step)
    Parameters
    Type Name Description
    EventProcessStep step

    The event process step entity to add.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    ArchivePastEventsAsync(CancellationToken)

    Archives events that have already passed.

    Declaration
    public Task<int> ArchivePastEventsAsync(CancellationToken ct = default)
    Parameters
    Type Name Description
    CancellationToken ct

    Cancellation token for the operation.

    Returns
    Type Description
    Task<int>

    A task that represents the asynchronous operation. The task result contains the number of events archived.

    DeleteAsync(Guid)

    Event löschen.

    Declaration
    public Task DeleteAsync(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task

    DeleteProcessAsync(Guid, Guid)

    Deletes a process from an event.

    Declaration
    public Task DeleteProcessAsync(Guid processId, Guid eventId)
    Parameters
    Type Name Description
    Guid processId

    The unique identifier of the process to delete.

    Guid eventId

    The unique identifier of the event.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    DeleteProcessStepAsync(Guid, Guid)

    Deletes a process step from an event.

    Declaration
    public Task DeleteProcessStepAsync(Guid processStepId, Guid eventId)
    Parameters
    Type Name Description
    Guid processStepId
    Guid eventId

    The unique identifier of the event.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    GetAllByOrganizationAsync(Guid)

    Retrieves all events belonging to a specific organization.

    Declaration
    public Task<IEnumerable<Event>> GetAllByOrganizationAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId

    The identifier of the organization

    Returns
    Type Description
    Task<IEnumerable<Event>>

    A collection of events associated with the organization

    GetAllEventsByOrganizationId(Guid)

    Retrieves all events for a specific organization by organization ID.

    Declaration
    public Task<IEnumerable<Event>> GetAllEventsByOrganizationId(Guid orgId)
    Parameters
    Type Name Description
    Guid orgId

    The unique identifier of the organization.

    Returns
    Type Description
    Task<IEnumerable<Event>>

    A task that represents the asynchronous operation. The task result contains a collection of event entities.

    GetByDateRangeAsync(DateTime, DateTime)

    Events in einem Datumsbereich.

    Declaration
    public Task<IEnumerable<Event>> GetByDateRangeAsync(DateTime from, DateTime to)
    Parameters
    Type Name Description
    DateTime from
    DateTime to
    Returns
    Type Description
    Task<IEnumerable<Event>>

    GetByIdAsync(Guid)

    Ein Event per Id zurückliefern.

    Declaration
    public Task<Event> GetByIdAsync(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task<Event>

    GetByIdWithDetailsAsync(Guid)

    Retrieves an event by its unique identifier with detailed information including related entities.

    Declaration
    public Task<Event?> GetByIdWithDetailsAsync(Guid eventId)
    Parameters
    Type Name Description
    Guid eventId

    The unique identifier of the event.

    Returns
    Type Description
    Task<Event>

    A task that represents the asynchronous operation. The task result contains the event entity with details or null if not found.

    GetByStatusAsync(EventStatus)

    Events nach Status filtern.

    Declaration
    public Task<IEnumerable<Event>> GetByStatusAsync(EventStatus status)
    Parameters
    Type Name Description
    EventStatus status
    Returns
    Type Description
    Task<IEnumerable<Event>>

    GetEventsToCompleteAsync(DateTime)

    Retrieves events that should be completed at the specified time.

    Declaration
    public Task<List<Event>> GetEventsToCompleteAsync(DateTime now)
    Parameters
    Type Name Description
    DateTime now

    The current date and time to check against.

    Returns
    Type Description
    Task<List<Event>>

    A task that represents the asynchronous operation. The task result contains a list of events that should be completed.

    GetEventsToStartAsync(DateTime)

    Retrieves events that should be started at the specified time.

    Declaration
    public Task<List<Event>> GetEventsToStartAsync(DateTime now)
    Parameters
    Type Name Description
    DateTime now

    The current date and time to check against.

    Returns
    Type Description
    Task<List<Event>>

    A task that represents the asynchronous operation. The task result contains a list of events that should be started.

    UpdateEventAsync(Event)

    Updates an existing event in the data store.

    Declaration
    public Task UpdateEventAsync(Event ev)
    Parameters
    Type Name Description
    Event ev

    The event entity with updated information.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateProcessAsync(EventProcess)

    Updates an existing event process.

    Declaration
    public Task UpdateProcessAsync(EventProcess proc)
    Parameters
    Type Name Description
    EventProcess proc

    The event process entity with updated information.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateProcessStepAsync(EventProcessStep)

    Updates an existing event process step.

    Declaration
    public Task UpdateProcessStepAsync(EventProcessStep step)
    Parameters
    Type Name Description
    EventProcessStep step

    The event process step entity with updated information.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    Implements

    IEventRepository
    In this article
    Back to top Generated by DocFX