var result = from r in context.Employee.
Where(e => e.Name == "Microsoft")
select new { e = r, w = r.WorkItem.Where(w => w.CreateTime == DateTime.Now) };
请问有否别的办法直接查上名为Microsoft今天的task,不用创建一个匿名类,直接直接能返回Employee类
var result = from r in context.Employee.
Where(e => e.Name == "Microsoft" && e.WorkItem.Where(e=>CreateTime == DateTime.Now));
这样又不行哦
----------------------------------------------------
Employee表:
PKID
Name
WorkItem表:
PKID
Task
EmployeeId
CreateTime
-------------------------------------------------------