Пример #1
0
        public static IEnumerable <IOrderShipGroupMvoState> ToOrderShipGroupMvoStateCollection(IEnumerable <OrderShipGroupId> ids)
        {
            var states = new List <OrderShipGroupMvoState>();

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

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