public IAttributeUseState Get(AttributeSetAttributeUseId id) { IAttributeUseState state = CurrentSession.Get <AttributeUseState>(id); if (state == null) { state = new AttributeUseState(); (state as AttributeUseState).AttributeSetAttributeUseId = id; } return(state); }
public IAttributeUseState Get(AttributeSetAttributeUseId id, bool nullAllowed) { IAttributeUseState state = CurrentSession.Get <AttributeUseState>(id); if (!nullAllowed && state == null) { state = new AttributeUseState(); (state as AttributeUseState).AttributeSetAttributeUseId = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IAttributeUseState>(state, new Type[] { }, _readOnlyPropertyNames)); } return(state); }