Exemple #1
0
        public IInOutLineState Get(InOutLineId id)
        {
            IInOutLineState state = CurrentSession.Get <InOutLineState>(id);

            if (state == null)
            {
                state = new InOutLineState();
                (state as InOutLineState).InOutLineId = id;
            }
            return(state);
        }
Exemple #2
0
        public IInOutLineState Get(InOutLineId id, bool nullAllowed)
        {
            IInOutLineState state = CurrentSession.Get <InOutLineState>(id);

            if (!nullAllowed && state == null)
            {
                state = new InOutLineState();
                (state as InOutLineState).InOutLineId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IInOutLineState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames));
            }
            return(state);
        }