首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CodeFluent能否在SQLServer中生成FileTable

CodeFluent能否在SQLServer中生成FileTable
EN

Stack Overflow用户
提问于 2015-12-04 03:46:58
回答 1查看 51关注 0票数 1

我正尝试在SQLServer 2014上的一个CodeFluent应用程序中为附件使用FileTable,但似乎无法获得正确的SQL (CREATE TABLE ...作为FileTable)。

有人知道如何在模型中定义这一点吗?

EN

回答 1

Stack Overflow用户

发布于 2015-12-04 04:11:38

不,CodeFluent实体不会生成FileTable。您可以在SQL脚本中创建它,然后将该脚本添加到您的解决方案中:SQL Server Producer - Custom scripts

但是,您可以使用FileTable来存储blobs。有两种使用FileTables的方法:

使用文件系统应用编程接口: FileTable可以作为经典文件夹进行访问,因此您可以使用文件系统二进制服务

代码语言:javascript
复制
<configuration>
  <configSections>
     <section name="Sample"type="CodeFluent.Runtime.CodeFluentConfigurationSectionHandler, CodeFluent.Runtime" />
  </configSections>
  <Sample binaryServicesTypeName="filesystem" fileSystemBlobStorageRootPath="path to file table" />
</configuration>

使用T-SQL: CodeFluent实体不支持开箱即用的方法。但是,您可以通过创建一个继承自CodeFluent.Runtime.BinaryServices.BaseBinaryLargeObject的类并覆盖ProtectedSavePersistenceLoadPersistenceDeleteGetOutputStreamGetInputStream等方法来支持它们。然后,您可以在配置文件中声明您的二进制服务:

代码语言:javascript
复制
<configuration>
  <configSections>
    <section name="Sample" type="CodeFluent.Runtime.CodeFluentConfigurationSectionHandler, CodeFluent.Runtime" />
  </configSections>

  <Sample binaryServicesTypeName="Sample.FileTableBinaryServices, Sample" />
</configuration>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34074850

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档