1

I am using Entity Framework as part of a project that should allow students and trainers to up- and download files and directories.

In order to show the documents I make a call to the db:

public static ObjectSet<Document> doc = frmFocus._context.Documents;

But this delivers all the properties including the actual data of the files. What I would like to do is retrieve only those that are relevant to the listview until the files to download have been selected.

Is this possible? I haven't been able to find a way.

2
  • 3
    Thanks for the down vote, could you perhaps tell me why so I don't make the same mistake again? Aug 12, 2012 at 16:14
  • 1
    I'm not the downvoter, but looking at how your question has a Close as NaRQ vote and considering the fact I read your question three times and still not sure what you meant to ask, it's probably because the question is confusing. In which case you may try to explain better and give some examples.
    – GSerg
    Aug 12, 2012 at 16:21

1 Answer 1

2

You can mark the content property to be loaded deferred.

You can easily achieve this using the designer.

Or you can of course directly edit the XML by adding the attribute IsDelayLoaded="true" to the column element.

1
  • Excellent mate, that helped a lot! Aug 12, 2012 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.