Click here to Skip to main content
15,904,297 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
I had appeared in interview where i was asked to write a query which i managed to write then i was asked to write same query in Linq but i couln't . Plz guide me. The query is given below;

select c.CustomerId,c.CustomerName, sum(o.OrderAmount) as 'Total Amount' from Customer c join [Order] o on c.CustomerId = o.CustomerId group by c.CustomerId, c.CustomerName
Posted
Updated 15-Jun-11 2:44am
v3

Please check the following link which has many samples of LINQ (also on joins and group by):
http://msdn.microsoft.com/en-us/vbasic/bb688085[^]
 
Share this answer
 
Comments
touseef4pk 15-Jun-11 11:49am    
thanks
Here[^] is another good introduction to LINQ.
 
Share this answer
 
Comments
touseef4pk 15-Jun-11 11:49am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900