Exemplo n.º 1
0
        public static IEnumerable <IShipmentReceiptMvoState> ToShipmentReceiptMvoStateCollection(IEnumerable <ShipmentReceiptId> ids)
        {
            var states = new List <ShipmentReceiptMvoState>();

            foreach (var id in ids)
            {
                var s = new ShipmentReceiptMvoState();
                s.ShipmentReceiptId = id;
                states.Add(s);
            }
            return(states);
        }
        public IShipmentReceiptMvoState Get(ShipmentReceiptId id, bool nullAllowed)
        {
            IShipmentReceiptMvoState state = CurrentSession.Get <ShipmentReceiptMvoState> (id);

            if (!nullAllowed && state == null)
            {
                state = new ShipmentReceiptMvoState();
                (state as ShipmentReceiptMvoState).ShipmentReceiptId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IShipmentReceiptMvoState>(state, new Type[] {  }, _readOnlyPropertyNames));
            }
            return(state);
        }