public IUomTypeState Get(string id, bool nullAllowed)
        {
            IUomTypeState state = CurrentSession.Get <UomTypeState> (id);

            if (!nullAllowed && state == null)
            {
                state = new UomTypeState();
                (state as UomTypeState).UomTypeId = id;
            }
            return(state);
        }
예제 #2
0
        public static IEnumerable <IUomTypeState> ToUomTypeStateCollection(IEnumerable <string> ids)
        {
            var states = new List <UomTypeState>();

            foreach (var id in ids)
            {
                var s = new UomTypeState();
                s.UomTypeId = id;
                states.Add(s);
            }
            return(states);
        }