ASP.Net Core 2.0 FileTable Usage
Asked Answered
S

1

6

I have an existing ASP.Net Core 2.0 project that uses Entity Framework Core and an SQL Server 2012 database.

There is a requirement to add a form that allows users to upload documents when creating a new item, my initial thoughts were to make use of SQL Servers FileTable for this purpose though this does not appear to be supported by Entity Framework Core.

The article https://damienbod.com/2015/12/05/asp-net-5-mvc-6-file-upload-with-ms-sql-server-filetable/ suggests a solution on how to use a FileTable with ASP.Net Core 2.0 which uses the folder created by the FileTable but it doesn't actually use the FileTable table in the database for meta-data or foreign key constraints etc.

What are the benefits of partially using a FileTable in this way in comparison to other methods, whatever they might be? Is there an alternative way of making full use of FileTable alongside Entity Framework?

Supercilious answered 11/1, 2018 at 9:47 Comment(0)
S
-1

I'm looking for the same thing, but currently it is not possible to use it correctly and simply neither in code first, nor in entityframework core.

The damienBod's tutorial is a workaround that only allows to do file historization with the filetable.

The advantage remains the management of files by qsl Server like backup, compression, differential of data.

A very classic management by storing our files in a folder and a document information table is more than enough.

there is an advantage however, if an application directly calls the filetable with stored procedures or sql query this is useful but archaic.

if you have any new information, I'll take it.

Strop answered 25/6, 2020 at 13:7 Comment(1)
FileTable creates a share on the SQL Server. You can simply use the Windows File APIs to write a file into that share to add it to the FileTable. You can then access the file either through the share or through TSQL.Forwent

© 2022 - 2024 — McMap. All rights reserved.