public IAttributeValueState Get(AttributeValueId id) { IAttributeValueState state = CurrentSession.Get <AttributeValueState>(id); if (state == null) { state = new AttributeValueState(); (state as AttributeValueState).AttributeValueId = id; } return(state); }
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); }