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