目前我join
在两个表上执行,结果可能是多行。
返回类型是IList<string>
当前,但我收到一个错误
错误:
Cannot implicitly convert type System.Collections.Generic.List<AnonymousType#1> to System.Collections.Generic.IList<string>
这是我的表达
public IList<string> GetPendingSubGroups()
{
using (var db = new DataClasses1DataContext())
{
var pendingSubGroup =
db.sys_Log_Account_SubGroups.Where(subGroup => subGroup.cAuthorizedStatus.Equals("Pending")).Join(
db.sys_Account_Primary_Groups, subGroup => subGroup.nGroupCode, group => group.nGroupCode,
(subGroup, group) => new
{
cSubGroupName = subGroup.cSubGroupName,
cAddedBy = subGroup.cAddedBy,
dAddedOn = subGroup.dAddedOn
}).ToList();
return pendingSubGroup;
}
}
谁能帮我解决这个问题?