TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankit Shukla
NA
681
117.6k
LINQ QUERY
Jul 14 2015 12:34 AM
Hello,
I am new in LINQ. There is a query given below. I want to know that what is the meaning of '
into g
' in 2nd line and '
g.key
' in 4th line.
//To achieve Select CategoryId, Count(CategoryID) As FieldName From ProductMst Group By CategoryId you need
to write follofing linq Query
var Result14 = from p in db.ProductMst
group p by p.CategoryID
into g
select new {
CategoryId =
g.Key
,
FieldName = g.Count()
};
Reply
Answers (
5
)
How to return dictionary with minimum value at element(0)
Handling Modal Popup in mvc