当前位置: 首页>>代码示例>>C#>>正文


C# IRepositoryFactory.GetRepositoryInstance方法代码示例

本文整理汇总了C#中IRepositoryFactory.GetRepositoryInstance方法的典型用法代码示例。如果您正苦于以下问题:C# IRepositoryFactory.GetRepositoryInstance方法的具体用法?C# IRepositoryFactory.GetRepositoryInstance怎么用?C# IRepositoryFactory.GetRepositoryInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IRepositoryFactory的用法示例。


在下文中一共展示了IRepositoryFactory.GetRepositoryInstance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DataManagementService

		public DataManagementService(
			IRepositoryFactory<IImportRepository> importRepositoryFactory, 			
			IRepositoryFactory<ICatalogRepository> catalogRepositoryFactory,
			IRepositoryFactory<IOrderRepository> orderRepositoryFactory,
			IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory,
			IAssetService blobProvider
			)
		{
			_orderRepositoryFactory = orderRepositoryFactory;
			_catalogRepositoryFactory = catalogRepositoryFactory;
			_importJobRepositoryFactory = importRepositoryFactory;
			_appConfigRepositoryFactory = appConfigRepositoryFactory;
			_assetProvider = blobProvider;

			_entityImporters = new List<IEntityImporter>
				{
					new ItemImporter() { Name = "Product"},
					new ItemImporter() { Name = "Sku"},
					new ItemImporter() { Name = "Bundle"},
					new ItemImporter() { Name = "DynamicKit"},
					new ItemImporter() { Name = "Package"},
					new PriceImporter(_catalogRepositoryFactory.GetRepositoryInstance()),
					new AssociationImporter(_catalogRepositoryFactory.GetRepositoryInstance()),
					new RelationImporter(_catalogRepositoryFactory.GetRepositoryInstance()),
					new CategoryImporter(),
					new LocalizationImporter(),
					new TaxValueImporter(),
					new ItemAssetImporter(),
					new TaxCategoryImporter(),
					new JurisdictionImporter(),
					new JurisdictionGroupImporter(),
					new SeoImporter()
				};

			_operationsList = new List<OperationStatus>();
		}
开发者ID:Wdovin,项目名称:vc-community,代码行数:36,代码来源:DataManagementService.cs

示例2: CustomerViewModel

		public CustomerViewModel(Contact item, IRepositoryFactory<ICustomerRepository> customerRepositoryFactory, ICustomerEntityFactory customerEntityFactory, IRepositoryFactory<ICountryRepository> countryRepositoryFactory, IViewModelsFactory<IAddressDialogViewModel> addressVmFactory)
        {
            _entityFactory = customerEntityFactory;
			_customerRepositoryFactory = customerRepositoryFactory;
			_addressVmFactory = addressVmFactory;
            _innerContact = item;

            _innerContact.PropertyChanged += _innerContact_PropertyChanged;

            CommandsInit();
            RequestInit();
            CollectionInit();

            //Get All Countries
            Action getAllCountiesAction = () =>
            {
				using (var repository = countryRepositoryFactory.GetRepositoryInstance())
                {
                    var countries = repository.Countries.Expand(c => c.Regions).OrderBy(c => c.Name).ToArray();
                    OnUIThread(() => { _allCountries = countries; });
                }
            };
            getAllCountiesAction.BeginInvoke(null, null);
        }
开发者ID:karpinskiy,项目名称:vc-community,代码行数:24,代码来源:CustomerViewModel.cs

示例3: KnowledgeBaseDialogViewModel

		public KnowledgeBaseDialogViewModel(
			IViewModelsFactory<IKnowledgeGroupViewModel> knowledgeVmFactory,
			IRepositoryFactory<ICustomerRepository> repositoryFactory,
			IViewModelsFactory<IKnowledgeGroupViewModel> groupVmFactory,
			ICustomerEntityFactory customerEntityFactory,
			IAuthenticationContext authContext,
			IViewModelsFactory<IKnowledgeBaseDialogViewModel> knowledgeBaseGroupVmFactory
			)
		{
			_knowledgeBaseGroupVmFactory = knowledgeBaseGroupVmFactory;
			_knowledgeVmFactory = knowledgeVmFactory;
			_entityFactory = customerEntityFactory;
			_repositoryFactory = repositoryFactory;
			_groupVmFactory = groupVmFactory;
			_customersRepository = _repositoryFactory.GetRepositoryInstance();
			InitCommands();
			RefreshRootKnowledgeGroups();
			this.ShowLoadingAnimation = false;
			AddKnowledgeBaseGroupDialogRequest = new InteractionRequest<Confirmation>();
			EditKnowledgeBaseGroupDialogRequest = new InteractionRequest<Confirmation>();
			CommonConfirmRequest = new InteractionRequest<Confirmation>();
			var _authContext = authContext;
			_authorId = _authContext.CurrentUserId;
			_authorName = _authContext.CurrentUserName;
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:25,代码来源:KnowledgeBaseDialogViewModel.cs


注:本文中的IRepositoryFactory.GetRepositoryInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。