Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 09, 2013 03:27 PM by urenjoy
Contributor
2777 Points
1161 Posts
Jan 09, 2013 02:57 PM|LINK
I'm trying to order the output of a database qurey using EF:
List<Logins> data = db.Logins.OrderBy( "Time", "ASC" ).ToList<Logins>();
But it's not compiling.
So my question is: What is the correct syntax of EF orderBy()
All-Star
134511 Points
21576 Posts
Moderator
MVP
Jan 09, 2013 03:13 PM|LINK
.OrderBy(item=>item.Time)
Star
11997 Points
1797 Posts
Jan 09, 2013 03:27 PM|LINK
List<Logins> data = db.Logins.OrderBy( x=>x.Time ).ToList();
eric2820
Contributor
2777 Points
1161 Posts
What is the correct sytax for EF orderBy(...)?
Jan 09, 2013 02:57 PM|LINK
I'm trying to order the output of a database qurey using EF:
List<Logins> data = db.Logins.OrderBy( "Time", "ASC" ).ToList<Logins>();
But it's not compiling.
So my question is: What is the correct syntax of EF orderBy()
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
ignatandrei
All-Star
134511 Points
21576 Posts
Moderator
MVP
Re: What is the correct sytax for EF orderBy(...)?
Jan 09, 2013 03:13 PM|LINK
.OrderBy(item=>item.Time)
urenjoy
Star
11997 Points
1797 Posts
Re: What is the correct sytax for EF orderBy(...)?
Jan 09, 2013 03:27 PM|LINK
List<Logins> data = db.Logins.OrderBy( x=>x.Time ).ToList();