日期:2014-05-20  浏览次数:20843 次

【求助】下面的Linq语句要怎么改,提示“无法从用法中推导出方法xx的类型实参”

public static List<ReTailerSalesDataInfo> GetRetailerSalesData<TKey>(int pageSize, int pageIndex,
 Expression<Func<PublisherSalesDaily, TKey>> orderBy, bool isOrderByDescending,
Expression<Func<PublisherSalesDaily, bool>> condition)
        {
            Entity.EntitesDataContext db = new EntitesDataContext(Business.Entities.Config.Default.ConnectionString);
            try
            {
                IQueryable<ReTailerSalesDataInfo> q = from sf in db.RetailerSalesFailedRows
                                                      from si in db.RetailerSalesInfoRows
                                                      where sf.Retailer == si.Retailer
                                                      select new ReTailerSalesDataInfo
                                                      {
                                                          Retailer = sf.Retailer,
                                                          ISBN = sf.ISBN,
                                                          Date = sf.Date,
                                                          SoldCount = si.Quantity,
                                                          ReturnedCount = sf.Quantity,