public List
getCustomerSpecials(int StoreID, int customerID)
{
Table<CategoryItem> specialsTable =
customersTable.Context.GetTable<CategoryItem>();
Table<CustomerCoupon> customerCouponsTable =
customersTable.Context.GetTable<CustomerCoupon>();
List<CategoryItem> specials = new List<CategoryItem>();
List<CustomerCoupon> coupons = new List<CustomerCoupon>();
coupons = customerCouponsTable.Where(coupon
=> coupon.Customer.CustomerID == customerID).ToList();
specials =
specialsTable.Where(cItem => cItem.StoreCategory.CategoryName ==
cItem.Item.Store.StoreCategorys[0].CategoryName &&
cItem.Item.Store.StoreID == StoreID).ToList();
var
query = from c in
coupons
join s in specials on c.ItemID equals
s.ItemID
select new { c.Item };
return
query.ToList();
}
No comments:
Post a Comment