Example #1
0
 internal Product(Engine engine, Fhr.ProductOffice.Models.Product product)
 {
     this.engine = engine;
     if (product == null)
         throw new Exception("product is null");
     DbProduct = product;
 }
Example #2
0
        internal Company(Engine engine, Fhr.ProductOffice.Models.Company company)
        {
            this.engine = engine;
            DbCompany = company;

            List<string> categories = engine.Db.Products.Where(p => p.CompanyId == company.Id).GroupBy(p => p.Category).Select(c => c.Key).ToList();
            this.categories = new HashSet<string>(categories);

            initialize_settings();
        }