Search Results for

    Show / Hide Table of Contents

    Interface IFileRepository

    Defines the contract for file data access operations and storage management.

    Namespace: OEMS.Core.Domain.RepoInterfaces
    Assembly: OEMS.Core.dll
    Syntax
    public interface IFileRepository

    Methods

    AddAsync(File)

    Adds a new file entity to the repository.

    Declaration
    Task<File> AddAsync(File file)
    Parameters
    Type Name Description
    File file

    The file entity to add

    Returns
    Type Description
    Task<File>

    The added file entity with updated properties

    DeleteFileAsync(Guid)

    Deletes a file by its identifier.

    Declaration
    Task DeleteFileAsync(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    The unique identifier of the file to delete

    Returns
    Type Description
    Task

    A task representing the asynchronous operation

    GetFileById(Guid)

    Retrieves a file entity by its identifier.

    Declaration
    Task<File> GetFileById(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    The unique identifier of the file

    Returns
    Type Description
    Task<File>

    The file entity, or null if not found

    GetFilePathById(Guid)

    Retrieves the file path for a file by its identifier.

    Declaration
    Task<string> GetFilePathById(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    The unique identifier of the file

    Returns
    Type Description
    Task<string>

    The file path, or null if not found

    GetFilePathByName(string)

    Retrieves the file path for a file by its name.

    Declaration
    Task<string> GetFilePathByName(string fileName)
    Parameters
    Type Name Description
    string fileName

    The name of the file

    Returns
    Type Description
    Task<string>

    The file path, or null if not found

    GetFilesByIdsAsync(IEnumerable<Guid>)

    Retrieves multiple files by their identifiers.

    Declaration
    Task<Dictionary<Guid, File>> GetFilesByIdsAsync(IEnumerable<Guid> fileIds)
    Parameters
    Type Name Description
    IEnumerable<Guid> fileIds

    The collection of file identifiers

    Returns
    Type Description
    Task<Dictionary<Guid, File>>

    A dictionary mapping file IDs to file entities

    GetLogoUrl(Guid)

    Retrieves the URL for accessing a logo file.

    Declaration
    Task<string> GetLogoUrl(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    The unique identifier of the logo file

    Returns
    Type Description
    Task<string>

    The URL for accessing the logo

    SaveFileAsync(string, string)

    Saves a file with the specified path and name.

    Declaration
    Task<Guid> SaveFileAsync(string filePath, string fileName)
    Parameters
    Type Name Description
    string filePath

    The path where the file is stored

    string fileName

    The name of the file

    Returns
    Type Description
    Task<Guid>

    The unique identifier of the saved file

    In this article
    Back to top Generated by DocFX