This example shows how to create a LINQ to SQL based file system provider for the ASPxFileManager. The provider retrieves data from DataContext connected to a database containing file/folder structure and contents. To improve performance, we do the following:
- Cache a folder list in memory to decrease the number of recursive LINQ to SQL queries made to a database (see the FolderCache property and the RefreshFolderCache method).
- Use delayed loading for the Data property mapped to a database field that stores file contents (the Delay Loaded property is set to True for this property in the DbFileSystemItem entity class).
Example Comments
Added By: .NET Developer at: 4/17/2013 3:50:21 PM
I tried copying the file LinqFileSystemProvider.vb to my own project, but it won't compile. Are there any references or dependencies I need to add first?