public List <PurchaseModel> GetPurchase(Guid subscriberId, Expression <Func <PurchaseEntity, bool> > predicate) { using (var context = ContextProvider.Provide()) { var goodses = context.Purchases.Where(s => s.SubscriberId == subscriberId).Where(predicate); return(_goodsJoiner.Join(goodses, context.PurchaseCategories).ToList()); } }
protected override List <PurchaseModel> SelectModel(IQueryable <PurchaseEntity> query, PurchaseContext context) { var models = _goodsJoiner.Join(query, context.PurchaseCategories); return(models.ToList()); }