public decimal GetDefaultPrice(int productId) { decimal result = 0; var defaultSize = _productSizeRepository.GetListWithNoTracking(c => c.ProductId == productId).FirstOrDefault(); var defaultPrice = _productRepository.Find(productId); var price = defaultPrice.Price; if (defaultSize != null) { result = defaultSize.Price; } return(price); }
public List <ProductSize> GetListWT(Expression <Func <ProductSize, bool> > exp = null, Func <IQueryable <ProductSize>, IOrderedQueryable <ProductSize> > orderby = null) { return(_ProductSizesRepository.GetListWithNoTracking(exp, orderby)); }