Ticket Q483608
Visible to All Users

Core - Make it easier to obtain IQueryable<T> collection through IObjectSpace for LINQ

created 12 years ago

XPO now has support for Linq. Entity Framework also has this kind of support.
It would be nice to be able to use Linq with IObjectSpace.

Show previous comments (3)
ST ST
Stanislaw Tristan 12 years ago

    I will use the David's solution on my commercial project, so I'm interesting that this 2 methods will be implemented at the core level.

    Aleksei M. (DevExpress) 12 years ago

      Hello Stanislaw,
      Thank you for your feedback. We will certainly take it into account when planning a time frame for this feature implementation.

        This would great, I also try to find any alternative to using criteria as strings.
        Just like David says, development brings a lot of changes and renaming and when things get big, lot of time is wasted in debugging those string criteria.

        Answers approved by DevExpress Support

        created 10 years ago (modified 9 years ago)

        We have implemented the functionality described in this ticket. It will be included in our next update(s).

        Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

        Additional information:

        The IObjectSpace interface now declares the following method:

        C#
        IQueryable<T> GetObjectsQuery<T>(Boolean inTransaction = false);

        This method is implemented in the XPObjectSpaceEFObjectSpace and NonPersistentObjectSpace classes.
        The inTransaction  parameter has effect in XPO only and enables the mode in which querying a data store for objects includes all in-memory changes into query results. Also, take special note that this method does not currently support Domain Components (DC).

        In the NonPersistentObjectSpace, the GetObjectsQuery method casts the collection of objects created in the ObjectsGetting event to IQueryable and returns the result.

          Comments (3)
          MB MB
          Mario Blatarić 9 years ago

            Hi!
            There have been few releases since, but I still don't see this feature. Didn't test new 15.1.8, but nothing in changes list regarding this.
            It's not a deal breaker, of course, since it's easy to implement this manually, but it would be nice to have it, especially since it's implemented.
            Regards,
            Mario

            Dennis Garavsky (DevExpress) 9 years ago

              @Mario: This feature is available starting with v15.2. Please wait a few weeks to test it or implement a simple custom solution (see above) today. Thanks.

              MB MB
              Mario Blatarić 9 years ago

                Ok, good to know. Thanks for info.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.