Linq query with join,groupby and where condition

  • Thread starter Thread starter aky73
  • Start date Start date
A

aky73

Guest
public List<Expanse> GetExpanse(string user, DateTime date)
{

return from i in db.ExpanseDetails
join e in db.Categorys on
i.CategoryId equals e.Id into eGroup
from both in eGroup.DefaultIfEmpty()
where i.user.Equals(username) && i.Date.Equals(date)
select new
{

i.Date,
i.Amount,
both.Type,
};
not working error explicit type cast error

Continue reading...
 
Back
Top