cd700dc758
DeepDrftWeb.Services → DeepDrftData; DeepDrftContent.Services → DeepDrftContent.Data. TrackEntity:BaseEntity, TrackRepository:Repository<>, TrackManager:Manager<>+ITrackService. Drops DeepDrftModels PagingParameters/PagedResult in favour of Models.Common.* from BlazorBlocks. InitialCreate migration captures full schema including is_deleted index.
19 lines
616 B
C#
19 lines
616 B
C#
using DeepDrftContent.Data.FileDatabase.Models;
|
|
|
|
namespace DeepDrftContent.Data.FileDatabase.Services;
|
|
|
|
/// <summary>
|
|
/// Factory for creating media vaults
|
|
/// </summary>
|
|
public static class MediaVaultFactory
|
|
{
|
|
public static async Task<MediaVault?> From(string rootPath, MediaVaultType mediaType, IndexFactoryService? factoryService = null)
|
|
{
|
|
return mediaType switch
|
|
{
|
|
MediaVaultType.Image => await ImageVault.FromAsync(rootPath, factoryService),
|
|
MediaVaultType.Audio => await AudioVault.FromAsync(rootPath, factoryService),
|
|
_ => null
|
|
};
|
|
}
|
|
} |