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