예제 #1
0
        internal static IEnumerable <Expression <Func <SalesOrderItem, SalesOrderItemReturn> > > SplitSelect()
        {
            var key             = SelectKey();
            var contractItemKey = SelectContractItemKey();

            return(new Projectors <SalesOrderItem, SalesOrderItemReturn>
            {
                { InventoryPickOrderItemProjectors.SplitSelect(), p => p.Translate().To <SalesOrderItem, SalesOrderItemReturn>(i => i.InventoryPickOrderItem) },
                i => new SalesOrderItemReturn
                {
                    SalesOrderItemKeyReturn = key.Invoke(i),
                    ContractItemKeyReturn = contractItemKey.Invoke(i),

                    PriceBase = i.PriceBase,
                    PriceFreight = i.PriceFreight,
                    PriceTreatment = i.PriceTreatment,
                    PriceWarehouse = i.PriceWarehouse,
                    PriceRebate = i.PriceRebate
                }
            });
        }