我需要从我的数据库中获取支付账单列表。以下是我的代码:
我遇到了这个错误:
public static List<dynamic> GetBillers()
{
DataLayer.DLContext context = new DataLayer.DLContext();
var Billers = (from b in context.Biller
where b.IsActive == true && b.IsDeleted == false
select new
{
ID = b.ID,
DisplayName = b.DisplayName
}).ToList();
return Billers;
}
我遇到了这个错误:
请帮我解决。无法隐式转换类型
Collections.Generic.List<AnonymousType#1>
为System.Collections.Generic.List<dynamic>
dynamic
了。 - Simon Whitehead