示例#1
0
        private MasterGroupService CreateMasterGroupService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new MasterGroupService(userId);

            return(service);
        }
示例#2
0
        private IProduceOrchestra Context()
        {
            IRepositoryAsync <Produce>      divisionRepository     = new Repository <Produce>(context, unitOfWork);
            IRepositoryAsync <MasterGroup>  masterGroupRepository  = new Repository <MasterGroup>(context, unitOfWork);
            IRepositoryAsync <ProduceGroup> produceGroupRepository = new Repository <ProduceGroup>(context, unitOfWork);
            ICache               cache               = Cache.Get(CacheType.Memory);
            IProduceService      produceService      = new ProduceService(divisionRepository, cache);
            IMasterGroupService  masterGroupService  = new MasterGroupService(masterGroupRepository, cache);
            IProduceGroupService produceGroupService = new ProduceGroupService(produceGroupRepository, cache);

            IProduceOrchestra produceOrchestra = new ProduceOrchestra(produceService, masterGroupService, produceGroupService);

            return(produceOrchestra);
        }