Search Results for

    Show / Hide Table of Contents

    Class EventCategoryRepository

    Inheritance
    object
    EventCategoryRepository
    Implements
    IEventCategoryRepository
    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 EventCategoryRepository : IEventCategoryRepository

    Constructors

    EventCategoryRepository(IDbContextFactory<OEMSDBContext>)

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

    Methods

    AddAsync(EventCategory)

    Neue Kategorie anlegen.

    Declaration
    public Task AddAsync(EventCategory category)
    Parameters
    Type Name Description
    EventCategory category
    Returns
    Type Description
    Task

    CheckCategoryNamesForDuplicates(string)

    Checks if category name already exists for the given organization.

    Declaration
    public Task<bool> CheckCategoryNamesForDuplicates(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    Task<bool>

    CheckIfEventWithCategory(Guid, Guid)

    Checks if any event is already assigned to the category. OrgId to connect the two objects since both have them. Returns a tuple with a boolean indicating if any event is found and a list of event names, to enable checking which events are assigned.

    Declaration
    public Task<(bool, List<string>)> CheckIfEventWithCategory(Guid orgId, Guid categoryId)
    Parameters
    Type Name Description
    Guid orgId
    Guid categoryId
    Returns
    Type Description
    Task<(bool hasAny, List<string> eventNames)>

    DeleteAsync(Guid)

    Kategorie per Id löschen.

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

    GetAllAsync()

    Alle Kategorien zurückliefern.

    Declaration
    public Task<IEnumerable<EventCategory>> GetAllAsync()
    Returns
    Type Description
    Task<IEnumerable<EventCategory>>

    GetAllByOrganizationAsync(Guid)

    Alle Kategorien einer Organisation zurückliefern.

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

    GetByIdAsync(Guid)

    Eine Kategorie per Id zurückliefern.

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

    UpdateAsync(EventCategory)

    Bestehende Kategorie aktualisieren.

    Declaration
    public Task UpdateAsync(EventCategory category)
    Parameters
    Type Name Description
    EventCategory category
    Returns
    Type Description
    Task

    Implements

    IEventCategoryRepository
    In this article
    Back to top Generated by DocFX