public IShipmentTypeState Get(string id, bool nullAllowed) { IShipmentTypeState state = CurrentSession.Get <ShipmentTypeState> (id); if (!nullAllowed && state == null) { state = new ShipmentTypeState(); (state as ShipmentTypeState).ShipmentTypeId = id; } return(state); }
public static IEnumerable <IShipmentTypeState> ToShipmentTypeStateCollection(IEnumerable <string> ids) { var states = new List <ShipmentTypeState>(); foreach (var id in ids) { var s = new ShipmentTypeState(); s.ShipmentTypeId = id; states.Add(s); } return(states); }