Exemplo n.º 1
0
        public static IEnumerable <IUomState> ToUomStateCollection(IEnumerable <string> ids)
        {
            var states = new List <UomState>();

            foreach (var id in ids)
            {
                var s = new UomState();
                s.UomId = id;
                states.Add(s);
            }
            return(states);
        }
Exemplo n.º 2
0
        public IUomState Get(string id, bool nullAllowed)
        {
            IUomState state = CurrentSession.Get <UomState> (id);

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