public IInOutLineMvoState Get(InOutLineId id) { IInOutLineMvoState state = CurrentSession.Get <InOutLineMvoState> (id); if (state == null) { state = new InOutLineMvoState(); (state as InOutLineMvoState).InOutLineId = id; } return(state); }
public static IEnumerable <IInOutLineMvoState> ToInOutLineMvoStateCollection(IEnumerable <InOutLineId> ids) { var states = new List <InOutLineMvoState>(); foreach (var id in ids) { var s = new InOutLineMvoState(); s.InOutLineId = id; states.Add(s); } return(states); }
public IInOutLineMvoState Get(InOutLineId id, bool nullAllowed) { IInOutLineMvoState state = CurrentSession.Get <InOutLineMvoState> (id); if (!nullAllowed && state == null) { state = new InOutLineMvoState(); (state as InOutLineMvoState).InOutLineId = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IInOutLineMvoState>(state, new Type[] { }, _readOnlyPropertyNames)); } return(state); }