public static IEnumerable <IPhysicalInventoryLineMvoState> ToPhysicalInventoryLineMvoStateCollection(IEnumerable <PhysicalInventoryLineId> ids)
        {
            var states = new List <PhysicalInventoryLineMvoState>();

            foreach (var id in ids)
            {
                var s = new PhysicalInventoryLineMvoState();
                s.PhysicalInventoryLineId = id;
                states.Add(s);
            }
            return(states);
        }
Esempio n. 2
0
        public IPhysicalInventoryLineMvoState Get(PhysicalInventoryLineId id, bool nullAllowed)
        {
            IPhysicalInventoryLineMvoState state = CurrentSession.Get <PhysicalInventoryLineMvoState> (id);

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