0

I have a Call object in Entity Framework representing a telephone call.

Can somebody help me out with a linq query?

I need to return the top 40 numbers dialed between a date range, including the number of times the number was dialed

Thanks

1
  • 6
    Post some code, we love code...mmmmm...code..aaargggghh (drool..) Commented Sep 1, 2011 at 13:55

1 Answer 1

3

Sounds like you want something like:

var query = (from call in db.PhoneCalls where call.Date >= minDate && call.Date <= maxDate group call by call.Number into g orderby g.Count() descending select new { Number = g.Key, Count = g.Count() }) .Take(40); 

That's just a guess based on what you've told us though...

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.