本文整理汇总了C#中EntityCollection.AsEnumerable方法的典型用法代码示例。如果您正苦于以下问题:C# EntityCollection.AsEnumerable方法的具体用法?C# EntityCollection.AsEnumerable怎么用?C# EntityCollection.AsEnumerable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntityCollection
的用法示例。
在下文中一共展示了EntityCollection.AsEnumerable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AdaptSupplier
internal static IQueryable<BL.DomainModel.Supplier> AdaptSupplier(EntityCollection<Supplier> supplierCollection)
{
if (supplierCollection.IsLoaded == false) return null;
var suppliers = from s in supplierCollection.AsEnumerable()
select AdaptSupplier(s);
return suppliers.AsQueryable();
}
示例2: AdaptAddresses
internal static IQueryable<BL.DomainModel.Address> AdaptAddresses(EntityCollection<Address> addressCollection)
{
if (addressCollection.IsLoaded == false)
return null;
var addresses = from a in addressCollection.AsEnumerable()
select AdaptAddress(a);
return addresses.AsQueryable();
}
示例3: AdaptRoles
internal static IQueryable<BL.DomainModel.Role> AdaptRoles(EntityCollection<Role> roleCollection)
{
if (roleCollection.IsLoaded == false)
return null;
var roles = from r in roleCollection.AsEnumerable()
select AdaptRole(r);
return roles.AsQueryable();
}
示例4: AdaptUsers
internal static IQueryable<BL.DomainModel.User> AdaptUsers(EntityCollection<User> userCollection)
{
if (userCollection.IsLoaded == false)
return null;
var users = from r in userCollection.AsEnumerable()
select AdaptUser(r);
return users.AsQueryable();
}
示例5: AdaptOrders
internal static IQueryable<BL.DomainModel.Order> AdaptOrders(EntityCollection<Order> orderCollection, BL.DomainModel.Customer c)
{
if (orderCollection.IsLoaded == false)
{
return null;
}
var orders = from o in orderCollection.AsEnumerable()
select AdaptOrder(o, c);
return orders.AsQueryable();
}
示例6: AdaptOrderDetails
internal static IQueryable<BL.DomainModel.OrderDetail> AdaptOrderDetails(EntityCollection<OrderDetail> orderDetailCollection, BL.DomainModel.Order o)
{
if (orderDetailCollection.IsLoaded == false)
{
return null;
}
var orderDetails = from d in orderDetailCollection.AsEnumerable()
select AdaptOrderDetail(d, o);
return orderDetails.AsQueryable();
}