这是我的查询
var maillst = (from o in ObjContext.CashDepositCapturings
join m in ObjContext.Merchants on o.MerchantID equals m.MerchantID
join u in ObjContext.Users on o.CreatedBy equals u.UserID
where u.EmailAddress != String.Empty && u.EmailAddress != null &&
o.CashDepositCapturingID.Equals(dataModel.CashDepositId)
select new CashDepositApproveMail
{
SendToEmailId = u.EmailAddress,
SendToFirstName = u.FirstName,
sendToLastName = u.LastName,
cashDepoCreatedBy = o.CreatedBy,
CashDepoCaptrId = o.CashDepositCapturingID
}).ToList();
这给了我错误:
无法解决等于操作中“SQL_Latin1_General_CP1_CI_AS”和“Latin1_General_CI_AS”之间的排序规则冲突。
但是当我删除 .ToList() 它工作正常
我有三个这样的查询我想将所有三个的结果添加到一个列表中并将其发送到某个函数。