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