Unable to create a constant value of type 'System.Object'. Only primitive types ('such as Int32,
有人可以告诉我此查询有什么问题吗
1 2 3 4 5 6 7 | 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 }; |
出现此错误:无法创建类型为
尝试使用"":
1 | Name = n.CategoryName +"" + m.SubCategoryName |