Strange behavior with linq query

Thread is closed for posting
2 posts, 0 answers
  1. Adam
    Adam  avatar
    30 posts
    Member since:
    Jun 2009

    Posted 16 Sep 2009 Link to this post

    Hi I have a web service method like this:

     public IEnumerable<TagData> GetTagsByTagType(string tagType) {
                Log.Debug("GetTagsByTagType Start");

                IEnumerable<TagData> query = new List<TagData>();
                try {

                    using (IObjectScope scope = new PhoenixObjectScopeProvider().GetNewObjectScope()) {

                        query = from tag in scope.Extent<Tag>()
                                join tagContent in scope.Extent<TagContent>()
                                    on tag equals tagContent.Tag
                                where tag.TagType == tagType
                                select new TagData {
                                                       TagId = tag.TagId,
                                                       TagType = tag.TagType,
                                                       Tag = tagContent.TagData

                catch (Exception e) {
                    Log.Error("GetTagsByTagType Exception.", e);


                return query;

    I use WCFStorm to call the method. In VS i set a break point at this method. When execution his the query line something strange happens. The return query line is never hit. An exception is not caught. It's like the method just stops executing at that point. Any ideas?
  2. Zoran
    Zoran avatar
    534 posts

    Posted 18 Sep 2009 Link to this post

    Hello Adam ,

    The bottom of your problem comes from the fact that you are using JOIN calls in you Linq query. Joins were not supported in the previous versions of OpenAccess including the current one. This will not be the case for the future though as joins are now fully supported by OpenAccess. The functionality will be publicly available in the next internal build/service pack.

    Thank you for your patience.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top