新手求助关于select选择多个字段的问题
我的LINQ这样写
var cookbook = from a in dataContext.cookbook
from b in dataContext.category
where a.FKTypeID == b.PKCategoryID
&& a.FKOrgID.ToString() == orgid
&& a.FKSemesterID.ToString() == semesterid
&& a.BeginDate == begin
&& a.EndDate == end
select new {
CategoryName=b.CategoryName,
PKCookbookID=a.PKCookbookID,
FKTypeID=a.FKTypeID,
FKWhatDay=a.FKWhatDay,
BeginDate=a.BeginDate,
EndDate=a.EndDate,
Week=a.Week,
DishesName=a.DishesName