Ejemplo n.º 1
0
        public static IEnumerable <IShipmentMethodTypeState> ToShipmentMethodTypeStateCollection(IEnumerable <string> ids)
        {
            var states = new List <ShipmentMethodTypeState>();

            foreach (var id in ids)
            {
                var s = new ShipmentMethodTypeState();
                s.ShipmentMethodTypeId = id;
                states.Add(s);
            }
            return(states);
        }
        public IShipmentMethodTypeState Get(string id, bool nullAllowed)
        {
            IShipmentMethodTypeState state = CurrentSession.Get <ShipmentMethodTypeState> (id);

            if (!nullAllowed && state == null)
            {
                state = new ShipmentMethodTypeState();
                (state as ShipmentMethodTypeState).ShipmentMethodTypeId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IShipmentMethodTypeState>(state, new Type[] {  }, _readOnlyPropertyNames));
            }
            return(state);
        }