Hey
Thanks for your reply.
It helped me a lot better.. but the thing s its returning the sum value for all the records... its not summing up for all individual records (Projects). Basically, I need to get the Fund Amount for each project.. Our query you explained above is returning the sum of the fund amount for all projects.. so its returning the same value for all records (Projects).
If possible can you please help me out of this.
BTW I have also modified your query like this:
var query = from p in db.Projects
join pf in db.ProjectFunds on p.ProjectID equals pf.ProjectID
join f in db.Funds on pf.FundID equals f.FundID
where pf.ProjectID==p.ProjectID
orderby p.Name
select new
{
p.Name,
p.Description,
p.ProjectID,
p.DistrictID,
Sum = db.ProjectFunds.Sum(i => i.Fund.TotalAmount)
};