Example #1
0
        public IAttributeSetInstanceExtensionFieldMvoState Get(AttributeSetInstanceExtensionFieldId id)
        {
            IAttributeSetInstanceExtensionFieldMvoState state = CurrentSession.Get <AttributeSetInstanceExtensionFieldMvoState> (id);

            if (state == null)
            {
                state = new AttributeSetInstanceExtensionFieldMvoState();
                (state as AttributeSetInstanceExtensionFieldMvoState).AttributeSetInstanceExtensionFieldId = id;
            }
            return(state);
        }
Example #2
0
        public static IEnumerable <IAttributeSetInstanceExtensionFieldMvoState> ToAttributeSetInstanceExtensionFieldMvoStateCollection(IEnumerable <AttributeSetInstanceExtensionFieldId> ids)
        {
            var states = new List <AttributeSetInstanceExtensionFieldMvoState>();

            foreach (var id in ids)
            {
                var s = new AttributeSetInstanceExtensionFieldMvoState();
                s.AttributeSetInstanceExtensionFieldId = id;
                states.Add(s);
            }
            return(states);
        }
        public IAttributeSetInstanceExtensionFieldMvoState Get(AttributeSetInstanceExtensionFieldId id, bool nullAllowed)
        {
            IAttributeSetInstanceExtensionFieldMvoState state = CurrentSession.Get <AttributeSetInstanceExtensionFieldMvoState> (id);

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