Exemplo n.º 1
0
        public DbMasterDataCache(ProductionDomainContext productionDomainContext)
        {
            _productionDomainContext = productionDomainContext;

            // cache tables
            _articles = new MasterDataTable <M_Article>(_productionDomainContext.Articles
                                                        .Include(x => x.ArticleType).ToList());
            _articleBoms = new MasterDataTable <M_ArticleBom>(_productionDomainContext.ArticleBoms);
            _articleToBusinessPartners =
                new MasterDataTable <M_ArticleToBusinessPartner>(_productionDomainContext
                                                                 .ArticleToBusinessPartners);
            _articleTypes =
                new MasterDataTable <M_ArticleType>(_productionDomainContext.ArticleTypes);
            _businessPartners =
                new MasterDataTable <M_BusinessPartner>(_productionDomainContext.BusinessPartners);
            _resources      = new MasterDataTable <M_Resource>(_productionDomainContext.Resources);
            _resourceSkills =
                new MasterDataTable <M_ResourceSkill>(_productionDomainContext.ResourceSkills);
            _resourceTools =
                new MasterDataTable <M_ResourceTool>(_productionDomainContext.ResourceTools);
            _resourceSetups =
                new MasterDataTable <M_ResourceSetup>(_productionDomainContext.ResourceSetups);
            _operations = new MasterDataTable <M_Operation>(_productionDomainContext.Operations);
            _stocks     = new MasterDataTable <M_Stock>(_productionDomainContext.Stocks);
            _units      = new MasterDataTable <M_Unit>(_productionDomainContext.Units);
        }