Table of Contents

Class FileRepository

Namespace
Oqtane.Repository
Assembly
Oqtane.Server.dll
public class FileRepository : IFileRepository
Inheritance
FileRepository
Implements

Constructors

FileRepository(IDbContextFactory<TenantDBContext>, IPermissionRepository, IFolderRepository, ITenantManager)

public FileRepository(IDbContextFactory<TenantDBContext> dbContextFactory, IPermissionRepository permissions, IFolderRepository folderRepository, ITenantManager tenants)

Parameters

dbContextFactory IDbContextFactory<TenantDBContext>
permissions IPermissionRepository
folderRepository IFolderRepository
tenants ITenantManager

Methods

AddFile(File)

public File AddFile(File file)

Parameters

file File

Returns

File

DeleteFile(int)

public void DeleteFile(int fileId)

Parameters

fileId int

GetFile(int)

public File GetFile(int fileId)

Parameters

fileId int

Returns

File

GetFile(int, bool)

public File GetFile(int fileId, bool tracking)

Parameters

fileId int
tracking bool

Returns

File

GetFile(int, string)

public File GetFile(int folderId, string fileName)

Parameters

folderId int
fileName string

Returns

File

GetFile(int, string, string)

public File GetFile(int siteId, string folderPath, string fileName)

Parameters

siteId int
folderPath string
fileName string

Returns

File

GetFilePath(File)

public string GetFilePath(File file)

Parameters

file File

Returns

string

GetFilePath(int)

public string GetFilePath(int fileId)

Parameters

fileId int

Returns

string

GetFiles(int)

public IEnumerable<File> GetFiles(int folderId)

Parameters

folderId int

Returns

IEnumerable<File>

GetFiles(int, bool)

public IEnumerable<File> GetFiles(int folderId, bool tracking)

Parameters

folderId int
tracking bool

Returns

IEnumerable<File>

UpdateFile(File)

public File UpdateFile(File file)

Parameters

file File

Returns

File