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