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