This is a migrated thread and some comments may be shown as answers.

Bug when formatting Linq query

3 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
miksh
Top achievements
Rank 1
Iron
miksh asked on 06 Dec 2011, 03:18 PM
See code below when applying code formatting - lost space before join/where/select.
// BEFORE:
                    cards = cards
                               .Select(c => c)
                               .Except(from cc in cards
                                       join ee in eExclusions on cc.EventId equals ee.EventId
                                       where ee.CommunityCode == communityCode
                                       select cc).ToList();
 
 
 
// AFTER:
                    cards = cards
                                 .Select(c => c)
                                 .Except(from cc in cardsjoin ee in eExclusions on cc.EventId equals ee.EventIdwhere ee.CommunityCode == communityCodeselect cc)
                                             .List();

3 Answers, 1 is accepted

Sort by
0
Accepted
Borislav
Telerik team
answered on 07 Dec 2011, 04:44 PM
Hi Miksh,

We have already fixed this problem. The fix will be available in our next release.

We are sorry for the inconvenience. Please stay tuned for our future releases.

Greetings,
Borislav
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
miksh
Top achievements
Rank 1
Iron
answered on 07 Dec 2011, 10:40 PM
Great, thanks.

Btw, is there a way to configure the Linq expression formatting, e.g. in the sample above to format it as follows, i.e. anythign startied with "from", "join", "where", "select" etc to start from a new line?

cards = cards
                      .Select(c => c)
                      .Except(from cc in cards
                                   join ee in eExclusions on cc.EventId equals ee.EventId
                                   where ee.CommunityCode == communityCode
                                   select cc)
                       .ToList();

0
Borislav
Telerik team
answered on 08 Dec 2011, 08:57 AM
Hi Miksh,

There is no way to apply a specific formatting style on linq query for the moment. I will log this into our system and we will try to do it as soon as possible.

All the best,
Borislav
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
General Discussions
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Borislav
Telerik team
miksh
Top achievements
Rank 1
Iron
Share this question
or