我可以延迟加载的标量的属性与ADO.Net Entity Framework的?标量、属性、加载、ADO

由网友(旧傷)分享简介:我有一个数据库表中的图片的一个巨大的列:数据的I've got a database table Image with one huge column: Data.我宁愿延迟加载了一列,所以我没有查询所有,当我得到我的所有图像的列表。I'd rather lazy load that one column so I...

我有一个数据库表中的图片的一个巨大的列:数据的

I've got a database table Image with one huge column: Data.

我宁愿延迟加载了一列,所以我没有查询所有,当我得到我的所有图像的列表。

I'd rather lazy load that one column so I'm not querying all that when I get a list of all my images.

我知道我可以把数据转化为自己的列和实体是这样的:

I know I can put the data into its own column and entity like this:

不过,我必须?

推荐答案

是的,我相信你不得不这样做。我不认为这是可能的EF

Yes I believe you do have to. I don't think it's possible with EF.

您可以让您需要的列一个明确的查询,然后再对数据列。就像在这篇文章的建议:

You could make an explicit query for the columns you need, and then later for the data-column. Like the suggestion in this post:

http://stackoverflow.com/questions/662873/how-to-load-varbinarymax-fields-only-when-necessary-with-ado-net-entity-framewo

但好像的LINQ to SQL提供了可能,所以我会尽力寻找到,如果它来EF了。

But it seems like Linq To SQL provides the possibility, so I'll try to look into if it's coming to EF too.

阅读全文

相关推荐

最新文章