This is a migrated thread and some comments may be shown as answers.
Strange behavior with linq query
1 Answer 13 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adam
Top achievements
Rank 1
Adam asked on 16 Sep 2009, 10:22 PM
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?

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 18 Sep 2009, 03:48 PM
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.

Regards,
Zoran
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.
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or