Global Fetch Strategy?

3 posts, 1 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 06 Oct Link to this post

    Is there any way to define a global fetch strategy (fluently mapped)?  Like everytime I query ObjectX I want nav properties ObjectY and ObjectZ to come down as well...

    So can I just set this somewhere in the model itself so the code littered throughout the side doesn't need to be changed\bloated with fetch code?

  2. Answer
    Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 07 Oct Link to this post

    Hello Steve,

    In order to achieve this by setting the fetch strategy directly in the context class (the class that inherits OpenAccessContext). The idea is to introduce a method in which you set the fetch strategy and to call this method from the constructor(s) of the context. An example is available in the attached project. You can take a look at the SetFetchStrategy() method.

    I hope this helps

    Regards,
    Doroteya
    Telerik by Progress
     
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
  3. DevCraft banner
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 07 Oct Link to this post

    Works great thx!
Back to Top