Exemple #1
0
        public IAttributeValueState Get(AttributeValueId id)
        {
            IAttributeValueState state = CurrentSession.Get <AttributeValueState>(id);

            if (state == null)
            {
                state = new AttributeValueState();
                (state as AttributeValueState).AttributeValueId = id;
            }
            return(state);
        }
Exemple #2
0
        public IAttributeValueState Get(AttributeValueId id, bool nullAllowed)
        {
            IAttributeValueState state = CurrentSession.Get <AttributeValueState>(id);

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