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

  • Thread starter Thread starter wolfgang schlicker
  • Start date Start date
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
 
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
 
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
 
Back
Top