Exemplo n.º 1
0
        public OrderModel CreateEmptyOrder()
        {
            var charges        = _orderChargeSearchRepository.GetEntities(UserContext.Current.SubscriberId, s => true);
            var chargeValues   = charges.Select(s => s.CreateEmptyValue()).ToList();
            var properties     = _orderPropertySearchRepository.GetEntities(UserContext.Current.SubscriberId, s => true);
            var propertyValues = properties.Select(s => s.CreateEmptyValue()).ToList();
            var order          = new OrderModel
            {
                Charges    = Mapper.Map <List <OrderChargeValueModel> >(chargeValues),
                Properties = Mapper.Map <List <OrderPropertyValueModel> >(propertyValues)
            };

            return(order);
        }
        public List <OrderChargeModel> GetCharges()
        {
            var charges = _orderChargeSearchRepository.GetEntities(UserContext.Current.SubscriberId, s => true);

            return(Mapper.Map <List <OrderChargeModel> >(charges));
        }