public IInOutLineState Get(InOutLineId id) { IInOutLineState state = CurrentSession.Get <InOutLineState>(id); if (state == null) { state = new InOutLineState(); (state as InOutLineState).InOutLineId = id; } return(state); }
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); }