Entity Framework and "Lazy loading" of dedicated attributes/properties

W

wolfgang schlicker

Hi NG,

I'm new in EF and i was wondering if it would be possible to load or better
"not load" some properties which do have a large size e.g. images, when
loading the complete table as an EntitySet into memory.

Is it possible to do that deferred loading of properties with large size in
EF?

I have read some articles about lazy loading, but i guess deferred loading
is only possible when loading complete tables using the include("tbl_xx")
statement.

Thanks in advance
/wolfgang
 
D

dotNetDave

Not sure what you are doing with the objects without the large sets of data,
but you could use a View, but that might introduct more issues if you need to
update the entity too. If you are just veiwing them, then a View would work
fine.

David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://codingstandards.notlong.com
 
J

John Smith

I'd suggest splitting the entity between tables and lazily loading the table
containing "heavy properites". EF can map single entity to multiple tables:
http://blogs.microsoft.co.il/blogs/gilf/archive/2009/03/06/entity-splitting-in-entity-framework.aspx



dotNetDave said:
Not sure what you are doing with the objects without the large sets of
data,
but you could use a View, but that might introduct more issues if you need
to
update the entity too. If you are just veiwing them, then a View would
work
fine.

David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://codingstandards.notlong.com


wolfgang schlicker said:
Hi NG,

I'm new in EF and i was wondering if it would be possible to load or
better
"not load" some properties which do have a large size e.g. images, when
loading the complete table as an EntitySet into memory.

Is it possible to do that deferred loading of properties with large size
in
EF?

I have read some articles about lazy loading, but i guess deferred
loading
is only possible when loading complete tables using the include("tbl_xx")
statement.

Thanks in advance
/wolfgang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top