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