Пример #1
0
        public static IEnumerable <IInventoryItemEntryMvoState> ToInventoryItemEntryMvoStateCollection(IEnumerable <InventoryItemEntryId> ids)
        {
            var states = new List <InventoryItemEntryMvoState>();

            foreach (var id in ids)
            {
                var s = new InventoryItemEntryMvoState();
                s.InventoryItemEntryId = id;
                states.Add(s);
            }
            return(states);
        }
Пример #2
0
        public IInventoryItemEntryMvoState Get(InventoryItemEntryId id, bool nullAllowed)
        {
            IInventoryItemEntryMvoState state = CurrentSession.Get <InventoryItemEntryMvoState> (id);

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