473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

linq anonymous class sort

Iw
Hi,

How to sort by UserName using linq and anonymous class ?

var select = from u in db.Users
select new
{
Id = u.UserId,
Name = u.UserName,
}

Nov 15 '08 #1
1 2636
On Fri, 14 Nov 2008 18:56:47 -0800, Iw <iw***@amorki.plwrote:
Hi, How to sort by UserName using linq and anonymous class ? var select
= from u in db.Users select new {
Id = u.UserId,
Name = u.UserName,
}
http://msdn.microsoft.com/en-us/library/bb383982.aspx
Nov 15 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Egghead | last post by:
Hi here, Does LINQ only work with "var" in C#? It only works: int cc = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; var b = from p in cc where (p 4) select p; but not this:
3
by: wildThought | last post by:
Playing around with LINQ and: SqlConnection con = new SqlConnection(@"Data Source=. \SQLExpress;Initial Catalog=Northwind;Integrated Security=SSPI"); Northwind db = new Northwind(con); var q...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
I want to develop a datagridview allowing column selection and filtering, like this: http://www.codeproject.com/KB/grid/GridFilter.aspx This example is using dataset. My question is if: a) I...
22
by: paululvinius | last post by:
Hi! Testing som Linq-expressions and tried to measure performance and compare it to pre-Linq programming. The folloing two methods are functional equal but the non-Linq one is twice as fast....
5
by: Andy B | last post by:
I was just wondering, when you create dataContext methods, should you put business logic there to try and minimize pushing data through 2-3 layers of code? or should the business logic still go in...
1
by: Dylan Parry | last post by:
Hi, I have two classes (Review and Author) that are representative of tables in my database. Both classes are marked up LINQ mappings. The database (and classes) is structured in such a way that...
13
by: Dan Tallent | last post by:
I have a query which I would like to convert to LINQ. I am having problems finding good examples or references that cover more complex queries. Here is the SQL command I would like to rewrite...
21
by: hrishy | last post by:
Hi Will LINQ be ported to Python ? regards Hrishy
1
by: =?Utf-8?B?TWl0Y2hX?= | last post by:
Hello, I have the following code: DirectoryInfo pdfDirectory = new DirectoryInfo(@"..\Documents"); var files = from f in pdfDirectory.GetFiles("*.pdf") select new { Filename =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.