public async Task <List <OrderMaster> > GetOrderMasterList(OrderMasterRequest request)
        {
            var list = base.SearchFor(request.GenerateExpression()).ToList();

            foreach (var item in list)
            {
                item.OrderDetails = orderDetails.BaseGetAll().Where(u => u.OrderId == item.Id).ToList();
            }
            return(await Task.FromResult(list));
        }
        public async Task <List <OrderMasterDto> > GetOrderMasterList(string aa)
        {
            OrderMasterRequest request = new OrderMasterRequest();
            var key = "CHProject:Demo:" + DateTime.Now.ToString("yyyy-MM-dd") + ":" + request.Name;

            if (RedisCommontHelper.CreateInstance().ContainsKey(key))
            {
                var entity = RedisCommontHelper.CreateInstance().Get <OrderMaster>(key);
                return(ObjectMapper.Map <List <OrderMaster>, List <OrderMasterDto> >(new List <OrderMaster>()
                {
                    entity
                }));
            }
            var list = await _orderMasterRepository.GetOrderMasterList(request);

            return(ObjectMapper.Map <List <OrderMaster>, List <OrderMasterDto> >(list));
        }
示例#3
0
 public async Task <List <OrderMasterDto> > GetOrderMasterList(OrderMasterRequest request)
 {
     return(await _orderMasterAppService.GetOrderMasterList(""));
 }