public static IEnumerable <IShipmentPackageContentMvoState> ToShipmentPackageContentMvoStateCollection(IEnumerable <ShipmentPackageContentId> ids)
        {
            var states = new List <ShipmentPackageContentMvoState>();

            foreach (var id in ids)
            {
                var s = new ShipmentPackageContentMvoState();
                s.ShipmentPackageContentId = id;
                states.Add(s);
            }
            return(states);
        }
示例#2
0
        public IShipmentPackageContentMvoState Get(ShipmentPackageContentId id, bool nullAllowed)
        {
            IShipmentPackageContentMvoState state = CurrentSession.Get <ShipmentPackageContentMvoState> (id);

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