Reputation: 907
Can any one tell me whats wrong in this query
var result = from m in _ftsDataContext.SubCategories
join n in _ftsDataContext.Categories
on m.CategoryID equals n.CategoryID
select new {
SubCategoryID = m.SubCategoryID,
Name = n.CategoryName + ' ' + m.SubCategoryName
};
i m getting this error : Unable to create a constant value of type System.Object
. Only primitive types (such as Int32
, String
, and Guid
) are supported in this context
Upvotes: 1
Views: 712
Reputation: 3191
Try with " " :
Name = n.CategoryName + " " + m.SubCategoryName
Upvotes: 2