实体框架、自跟踪实体和sqlserver文件流
我刚刚启动一个项目,需要有一个读取和写入文件的 WCF 服务。
该架构基于使用实体框架自我跟踪实体的 DDD。
简单的 GUI 应该显示一个包含文件列表的网格,然后单击可以下载它的行。
我可以在此架构中使用文件流 sql server 2008 功能吗?哪种策略是管理此类实体的最佳策略?
谢谢。
I just start a project where I need to have a WCF services that read and write files.
The architecture is based on DDD using Entity Framework Self-Tracking Entity.
The simple GUI should show a grid with a list of file and then click the row you can download it.
Can I use the file stream sql server 2008 feature with this architecture? Which strategy is the best one to manage this kind of entity?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 EF 时,
Filestream
不会为您提供帮助。 EF 不使用流功能,它将其加载为varbinary(max)
。如果您想利用文件流,则必须 直接使用 ADO.NET 从数据库加载它 并且您需要一个 流媒体服务以有效的方式将其传回客户端。Filestream
will not help you when using EF. EF doesn't use streaming feature, it loads it asvarbinary(max)
. If you wan to take advantage of filestream you must load it from database with ADO.NET directly and you need a streaming service to pass it back to the client in efficient way.