consolidate interface and implementation classes

This commit is contained in:
sbwalker
2025-08-11 16:36:09 -04:00
parent d7eb0dc509
commit b3f6194fda
55 changed files with 309 additions and 473 deletions

View File

@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Oqtane.Extensions;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
@ -10,6 +9,21 @@ using File = Oqtane.Models.File;
namespace Oqtane.Repository
{
public interface IFileRepository
{
IEnumerable<File> GetFiles(int folderId);
IEnumerable<File> GetFiles(int folderId, bool tracking);
File AddFile(File file);
File UpdateFile(File file);
File GetFile(int fileId);
File GetFile(int fileId, bool tracking);
File GetFile(int folderId, string fileName);
File GetFile(int siteId, string folderPath, string fileName);
void DeleteFile(int fileId);
string GetFilePath(int fileId);
string GetFilePath(File file);
}
public class FileRepository : IFileRepository
{
private readonly IDbContextFactory<TenantDBContext> _dbContextFactory;