public IAttributeSetState Get(string id) { IAttributeSetState state = CurrentSession.Get <AttributeSetState> (id); if (state == null) { state = new AttributeSetState(); (state as AttributeSetState).AttributeSetId = id; } return(state); }
public static IEnumerable <IAttributeSetState> ToAttributeSetStateCollection(IEnumerable <string> ids) { var states = new List <AttributeSetState>(); foreach (var id in ids) { var s = new AttributeSetState(); s.AttributeSetId = id; states.Add(s); } return(states); }
public IAttributeSetState Get(string id, bool nullAllowed) { IAttributeSetState state = CurrentSession.Get <AttributeSetState> (id); if (!nullAllowed && state == null) { state = new AttributeSetState(); (state as AttributeSetState).AttributeSetId = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IAttributeSetState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames)); } return(state); }