public static IEnumerable <IGoodIdentificationMvoState> ToGoodIdentificationMvoStateCollection(IEnumerable <ProductGoodIdentificationId> ids)
        {
            var states = new List <GoodIdentificationMvoState>();

            foreach (var id in ids)
            {
                var s = new GoodIdentificationMvoState();
                s.ProductGoodIdentificationId = id;
                states.Add(s);
            }
            return(states);
        }
Beispiel #2
0
        public IGoodIdentificationMvoState Get(ProductGoodIdentificationId id, bool nullAllowed)
        {
            IGoodIdentificationMvoState state = CurrentSession.Get <GoodIdentificationMvoState> (id);

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