本文整理汇总了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>();
}
示例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);
}
示例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;
}