public static IEnumerable <IUomConversionState> ToUomConversionStateCollection(IEnumerable <UomConversionId> ids) { var states = new List <UomConversionState>(); foreach (var id in ids) { var s = new UomConversionState(); s.UomConversionId = id; states.Add(s); } return(states); }
public IUomConversionState Get(UomConversionId id, bool nullAllowed) { IUomConversionState state = CurrentSession.Get <UomConversionState> (id); if (!nullAllowed && state == null) { state = new UomConversionState(); (state as UomConversionState).UomConversionId = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IUomConversionState>(state, new Type[] { }, _readOnlyPropertyNames)); } return(state); }