FileSystemConfiguration.FileSystemProvider Property
Specifies a file system provider.
Namespace: DevExtreme.AspNet.Mvc.FileManagement
Assembly: DevExtreme.AspNet.Core.dll
Declaration
public IFileProvider FileSystemProvider { get; set; }
Property Value
The following example illustrates how to specify a file system provider.
DBFileProvider.cs
public class DbFileProvider : IFileProvider {
const int DbRootItemId = -1;
static readonly char[] PossibleDirectorySeparators = { '\\', '/' };
ArtsDBContext DataContext { get; }
public DbFileProvider(ArtsDBContext _context) {
DataContext = _context;
}
public void Copy(string sourceKey, string destinationKey) {
//...
}
public void CreateDirectory(string rootKey, string name) {
// ...
}
// ...
}
API Controller:
public IActionResult FileSystem(FileSystemCommand command, string arguments) {
var config = new FileSystemConfiguration {
FileSystemProvider = new DbFileProvider(ArtsDBContext),
//...
}
}
Online Demo: File Manager - Binding to Entity Framework
Online Example: File Manager - How to connect to a database using IFIleSystemProvider
See Also