public static IEnumerable <IMovementConfirmationState> ToMovementConfirmationStateCollection(IEnumerable <string> ids) { var states = new List <MovementConfirmationState>(); foreach (var id in ids) { var s = new MovementConfirmationState(); s.DocumentNumber = id; states.Add(s); } return(states); }
public IMovementConfirmationState Get(string id, bool nullAllowed) { IMovementConfirmationState state = CurrentSession.Get <MovementConfirmationState> (id); if (!nullAllowed && state == null) { state = new MovementConfirmationState(); (state as MovementConfirmationState).DocumentNumber = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IMovementConfirmationState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames)); } return(state); }