【发布时间】:2010-09-01 13:56:55
【问题描述】:
我的查询如下所示:
var results = from person
where <here I need to do something like if person is of type
Employee, call person.GetSalary() > 100000 but if the person is of type Contractor, I need to execute
several lines of code before doing a person.GetSalary() > 100000
select new {person.Name}
难点在于构造 where 子句。有人可以帮我完成这个查询吗?
【问题讨论】:
标签: .net asp.net-mvc linq linq-to-entities