private MP_TeraPeakCategory GetOrCreateCategory(TeraPeakCategory category) { var tpCategory = _session.Get <MP_TeraPeakCategory>(category.Id); if (tpCategory != null) { return(tpCategory); } tpCategory = new MP_TeraPeakCategory { Id = category.Id, FullName = category.FullName, Name = category.Name, Level = category.Level, ParentCategoryID = category.ParentCategoryID }; _session.Save(tpCategory); return(tpCategory); }
public CategoryAndListings(TeraPeakCategory category, int listings) { _category = category; _listings = listings; }