如何加载的varbinary(最大)字段只有在必要时才使用ADO.NET实体框架? [英] How to load varbinary(max) fields only when necessary with ADO.NET Entity Framework?

查看:182
本文介绍了如何加载的varbinary(最大)字段只有在必要时才使用ADO.NET实体框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的表之一为varbinary(最大)字段,但我每次都不会需要它,我正在寻找一种方法,只在必要时从数据库读取它。我使用ADO.NET实体框架。那怎么办?

I have a varbinary(max) field in one of my tables but I don't need it every time and I'm looking for a way to fetch it from the database only when necessary. I'm using ADO.NET Entity Framework. How to do that?

推荐答案

该解决方案是创建一个单独的表与VARBINARY领域,使表之间1对1的关系。

The solution was to create a separate table with the varbinary field and make 1-to-1 relationship between the tables

这篇关于如何加载的varbinary(最大)字段只有在必要时才使用ADO.NET实体框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆