Esempio n. 1
0
        public static IEnumerable <IPickwaveState> ToPickwaveStateCollection(IEnumerable <long?> ids)
        {
            var states = new List <PickwaveState>();

            foreach (var id in ids)
            {
                var s = new PickwaveState();
                s.PickwaveId = id;
                states.Add(s);
            }
            return(states);
        }
        public IPickwaveState Get(long?id, bool nullAllowed)
        {
            IPickwaveState state = CurrentSession.Get <PickwaveState> (id);

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