Contact Us
Forum Home
>
DevForce
>
DevForce 2009
New Posts
FAQ
Search
Calendar
Register
Login
how can I sort the entities from 'B' to 'D'?
Post Reply
Author
Message
Share Topic
Printable Version
Delicious
Digg
Facebook
Furl
Google Boomarks
Google Buzz
MySpace
Newsvine
reddit
StumbleUpon
Translate
Twitter
Windows Live
Yahoo Bookmarks
Topic Search
Topic Options
Post Reply
Create New Topic
GregD
Members Profile
Send Private Message
Find Members Posts
Add to Buddy List
IdeaBlade
Joined: 09-May-2007
Posts: 374
Post Options
Post Reply
Quote GregD
Report Post
Quote
Reply
Topic: how can I sort the entities from 'B' to 'D'?
Posted: 16-Jul-2009 at 11:55am
Two ways:
manager.Debtors.Where(o => o.L_NAME.StartsWith("B") || o.L_NAME.StartsWith(C") || o.L_NAME.StartsWith("D") )
or more succinctly (better for a large set):
manager.Debtors.Where(o => "BCD".Contains(o.L_NAME.Substring(0, 1)))
monkeyking
Members Profile
Send Private Message
Find Members Posts
Add to Buddy List
Groupie
Joined: 04-Mar-2009
Location: brisbane
Posts: 68
Post Options
Post Reply
Quote monkeyking
Report Post
Quote
Reply
Posted: 10-Jul-2009 at 11:26pm
I want to make query to find out all 'Debtor' entities which the property of 'L_NAME' from 'B' to 'D', how can I do it?
sth like that,
var query = AdditionalFunctions.manager.Debtors.Where(o =>
o.L_NAME >= 'B' && o.L_NAME <= 'D'
);
but actually this line of code doesn't work, if you get my mean, please let me know a correct way to achieve this
Regards
John
Post Reply
Forum Jump
-- Select Forum --
Community Forum
Community Forum
Community Forum now on StackOverflow
DevForce 2012
DevForce 2010
DevForce 2009
DevForce Classic
Forum Permissions
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum