public Result <PromotionProductSummaryDto> GetPromotionProducts(ProductPromotionSearchFilter productPromotionSearchFilter) { using (UnitOfWork unitOfWork = new UnitOfWork()) { return(unitOfWork.PromotionProductSummaries.Get(productPromotionSearchFilter, PromotionProductMappers.Instance.MapToPromotionProductSummaryDto)); } }
public HttpResponseMessage GetPromotionProducts(ProductPromotionSearchFilter productPromotionSearchFilter) { Result <PromotionProductSummaryDto> result = promotionProductManager.GetPromotionProducts(productPromotionSearchFilter); MapRelativeLogoPaths(result.Items); return(Request.CreateResponse <Result <PromotionProductSummaryDto> >(HttpStatusCode.OK, result)); }
public Result <PromotionProductSummaryDto> Get(ProductPromotionSearchFilter productPromotionSearchFilter, Func <SqlDataReader, PromotionProductSummaryDto> promotionProductDtoMapper) { List <SqlQueryParameter> sqlQueryParameters = GetPagedDataParameters(productPromotionSearchFilter.PageData); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "ProductId", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Integer, ParameterValue = productPromotionSearchFilter.ProductId }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "SearchText", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = productPromotionSearchFilter.SearchText }); return(GetPagedEntities("PromotionProductsFetch", promotionProductDtoMapper, sqlQueryParameters.ToArray())); }