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


C# IRepositoryFactory类代码示例

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


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

示例1: PropertyViewModel

        public PropertyViewModel(IViewModelsFactory<IPropertyValueViewModel> propertyValueVmFactory, IViewModelsFactory<IPropertyAttributeViewModel> attributeVmFactory, ICatalogEntityFactory entityFactory, Property item, catalogModel.Catalog parentCatalog, IRepositoryFactory<ICatalogRepository> repositoryFactory, ObservableCollection<Property> properties)
        {
            InnerItem = item;
            _propertyValueVmFactory = propertyValueVmFactory;
            _attributeVmFactory = attributeVmFactory;
            _entityFactory = entityFactory;
            _properties = properties;
            ParentCatalog = parentCatalog;
            // _repositoryFactory = repositoryFactory;

            ValueAddCommand = new DelegateCommand(RaiseValueAddInteractionRequest);
            ValueEditCommand = new DelegateCommand<PropertyValueBase>(RaiseValueEditInteractionRequest, x => x != null);
            ValueDeleteCommand = new DelegateCommand<PropertyValueBase>(RaiseValueDeleteInteractionRequest, x => x != null);

            AttributeAddCommand = new DelegateCommand(RaiseAttributeAddInteractionRequest);
            AttributeEditCommand = new DelegateCommand<PropertyAttribute>(RaiseAttributeEditInteractionRequest, x => x != null);
            AttributeDeleteCommand = new DelegateCommand<PropertyAttribute>(RaiseAttributeDeleteInteractionRequest, x => x != null);


            CommonConfirmRequest = new InteractionRequest<Confirmation>();

            var allValueTypes = (PropertyValueType[])Enum.GetValues(typeof(PropertyValueType));
            PropertyTypes = new List<PropertyValueType>(allValueTypes);
            PropertyTypes.Sort((x, y) => x.ToString().CompareTo(y.ToString()));
        }
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:25,代码来源:PropertyViewModel.cs

示例2: FirstNRequests

 /// <summary>
 /// Take first N request.
 /// </summary>
 /// <param name="n">number of requests</param>
 public static List<Request> FirstNRequests(IRepositoryFactory factory, int n)
 {
     return factory.RequestRepository.Get()
         .OrderByDescending(r => r.Date)
         .Take(n)
         .ToList();
 }
开发者ID:tazik047,项目名称:PaymentSystem,代码行数:11,代码来源:RequestService.cs

示例3: NotificationServiceTests

        public NotificationServiceTests()
        {
            EmailRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<EmailQueue, Guid>>();
            EmailPreferenceRepository = MockRepository.GenerateStub < IRepositoryWithTypedId<EmailPreferences, string>>();
            UserIdentity = MockRepository.GenerateStub<IUserIdentity>();
            UserRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<User, string>>();
            OrderStatusCodeRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<OrderStatusCode, string>>();
            ServerLink = MockRepository.GenerateStub<IServerLink>();
            QueryRepositoryFactory = MockRepository.GenerateStub<IQueryRepositoryFactory>();
            RepositoryFactory = MockRepository.GenerateStub<IRepositoryFactory>();
            RepositoryFactory.OrganizationRepository =
                MockRepository.GenerateStub<IRepositoryWithTypedId<Organization, string>>();

            AdminWorkgroupRepository = MockRepository.GenerateStub<IRepository<AdminWorkgroup>>();
            QueryRepositoryFactory.AdminWorkgroupRepository = AdminWorkgroupRepository;
            WorkgroupRepository = MockRepository.GenerateStub<IRepository<Workgroup>>();
            RepositoryFactory.WorkgroupRepository = WorkgroupRepository;

            NotificationService = new NotificationService(EmailRepository, EmailPreferenceRepository, UserRepository, OrderStatusCodeRepository, UserIdentity, ServerLink, QueryRepositoryFactory, RepositoryFactory);

            ServerLink.Expect(a => a.Address).Return("FakeHost").Repeat.Any();
            ApprovalRepository = MockRepository.GenerateStub<IRepository<Approval>>();

            SetupOrderStatusCodes();
        }
开发者ID:ucdavis,项目名称:Purchasing,代码行数:25,代码来源:NotificationServiceTestsInit.cs

示例4: MainFulfillmentViewModel

		public MainFulfillmentViewModel(
			IInventoryHomeViewModel inventoryVm, 
			IPicklistHomeViewModel picklistVm, 
			IRmaHomeViewModel rmaVm, 
			IViewModelsFactory<ICompleteShipmentViewModel> completeShipmentVmFactory,
			IRepositoryFactory<IOrderRepository> orderRepositoryFactory,
			IOrderService orderService,
			IAuthenticationContext authContext)
        {
            ViewTitle = new ViewTitleBase { Title = "Fulfillment", SubTitle = "FULFILLMENT SERVICE" };
			_inventoryHomeVm = inventoryVm;
			_inventoryHomeVm.ParentViewModel = this;
			
			_picklistHomeVm = picklistVm;
			_picklistHomeVm.ParentViewModel = this;

			_rmaHomeVm = rmaVm;
			_rmaHomeVm.ParentViewModel = this;

			_completeShipmentVmFactory = completeShipmentVmFactory;
			_orderRepositoryFactory = orderRepositoryFactory;
			_authContext = authContext;

			_orderService = orderService;

			PopulateTabItems();
			CompleteShipmentCommand = new DelegateCommand(RaiseCompleteShipment);
			CommonConfirmRequest = new InteractionRequest<Confirmation>();
			CommonNotifyRequest = new InteractionRequest<Notification>();
        }
开发者ID:karpinskiy,项目名称:vc-community,代码行数:30,代码来源:MainFulfillmentViewModel.cs

示例5: ViewModelFactory

 public ViewModelFactory(IRepositoryFactory repositoryFactory, IImportManagerFactory importManagerFactory)
 {
     repositoryFactory.ThrowIfNull("repositoryFactory");
     importManagerFactory.ThrowIfNull("importManagerFactory");
     this.repositoryFactory = repositoryFactory;
     this.importManagerFactory = importManagerFactory;
 }
开发者ID:CookieWookie,项目名称:ais,代码行数:7,代码来源:ViewModelFactory.cs

示例6: TasksModel

 public TasksModel(ISourceControl sourceControl, IIssuesTracking issuesTracking, IRepositoryFactory repositoryFactory)
 {
     _sourceControl = sourceControl;
     _issuesTracking = issuesTracking;
     _repositoryFactory = repositoryFactory;
     LoadModels();
 }
开发者ID:Celdorfpwn,项目名称:ASAP,代码行数:7,代码来源:TasksModel.cs

示例7: ConfigSetTask

 public ConfigSetTask(IRepositoryFactory repositoryFactory, IEnvironmentTasks environmentTasks)
 {
     this.cacheController = cacheController;
     this.environmentTasks = environmentTasks;
     Repository = repositoryFactory.GetRepository();
     Repository.SavingChanges += SavingChanges;
 }
开发者ID:JonasSyrstad,项目名称:Stardust,代码行数:7,代码来源:ConfigSetTask.cs

示例8: Create

        public static GenotypingViewModel Create(IRepositoryFactory repositoryFactory, User user, JobType jobType = null, GenotypingPostModel postModel = null)
        {
            var viewModel = new GenotypingViewModel()
                {
                    JobType = jobType,
                    JobTypes = jobType == null ? repositoryFactory.JobTypeRepository.Queryable.Where(a => a.Genotyping).ToList() : new List<JobType>(),
                    PostModel = postModel ?? new GenotypingPostModel() {NumPlates = 1}
                };

            if (jobType != null)
            {
                var rid = postModel != null && postModel.RechargeAccount != null ? postModel.RechargeAccount.Id : -1;
                viewModel.RechargeAccounts = new SelectList(user.RechargeAccounts, "Id", "AccountNum", rid);

                var pts = new List<SelectListItem>();
                pts.Add(new SelectListItem() { Value = ((int)Core.Resources.PlateTypes.NinetySix).ToString(), Text = EnumUtility.GetEnumDescription(Core.Resources.PlateTypes.NinetySix) });
                pts.Add(new SelectListItem() { Value = ((int)Core.Resources.PlateTypes.ThreeEightyFour).ToString(), Text = EnumUtility.GetEnumDescription(Core.Resources.PlateTypes.ThreeEightyFour) });
                viewModel.PlateTypes = new SelectList(pts, "Value", "Text");

                var did = postModel != null && postModel.Dyes != null ? postModel.Dyes : new List<int>();
                viewModel.Dyes = new MultiSelectList(repositoryFactory.DyeRepository.Queryable.Where(a => a.Genotyping), "Id", "Name", did);
            }

            return viewModel;
        }
开发者ID:ucdavis,项目名称:CAESGenome,代码行数:25,代码来源:GenotypingViewModel.cs

示例9: UserService

        public UserService(IRepositoryFactory _repositoryFactory, IHraSessionManager hraSessionManger)
        {
            this._repositoryFactory = _repositoryFactory;
            _hraSessionManager = hraSessionManger;

            sample = new SampleData();
        }
开发者ID:mahitosh,项目名称:HRA4,代码行数:7,代码来源:UserService.cs

示例10: WorkgroupServiceTests

        public WorkgroupServiceTests()
        {
            AutomapperConfig.Configure();
            VendorRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Vendor, string>>();
            VendorAddressRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<VendorAddress, Guid>>();
            UserRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<User, string>>();
            EmailPreferencesRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<EmailPreferences, string>>();
            WorkgroupPermissionRepository = MockRepository.GenerateStub<IRepository<WorkgroupPermission>>();
            WorkgroupRepository = MockRepository.GenerateStub<IRepository<Workgroup>>();
            OrganizationRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Organization, string>>();
            SearchService = MockRepository.GenerateStub<IDirectorySearchService>();
            RepositoryFactory = MockRepository.GenerateStub<IRepositoryFactory>();
            RepositoryFactory.RoleRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Role, string>>();
            RepositoryFactory.WorkgroupPermissionRepository = WorkgroupPermissionRepository;
            RepositoryFactory.AccountRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Account, string>>();
            QueryRepositoryFactory = MockRepository.GenerateStub<IQueryRepositoryFactory>();
            UserIdentity = MockRepository.GenerateStub<IUserIdentity>();

            QueryRepositoryFactory.RelatatedWorkgroupsRepository =
                MockRepository.GenerateStub<IRepository<RelatedWorkgroups>>();

            WorkgroupService = new WorkgroupService(VendorRepository,
                VendorAddressRepository,
                UserRepository,
                EmailPreferencesRepository,
                WorkgroupPermissionRepository,
                WorkgroupRepository,
                OrganizationRepository,
                SearchService,
                RepositoryFactory, QueryRepositoryFactory, UserIdentity);
        }
开发者ID:ucdavis,项目名称:Purchasing,代码行数:31,代码来源:WorkgroupServiceTests.cs

示例11: DisplayTemplateOverviewStepViewModel

        public DisplayTemplateOverviewStepViewModel(
			IRepositoryFactory<IAppConfigRepository> repositoryFactory, 
			IAppConfigEntityFactory entityFactory, 
			DisplayTemplateMapping item)
            : base(null, repositoryFactory, entityFactory, null, null, item)
		{
		}
开发者ID:Wdovin,项目名称:vc-community,代码行数:7,代码来源:CreateDisplayTemplateViewModel.cs

示例12: TableStorageContextFactory

 public TableStorageContextFactory(
     ICloudStorageServices cloudStorageServices,
     IRepositoryFactory repositoryFactory)
 {
     this.cloudStorageServices = cloudStorageServices;
     this.repositoryFactory = repositoryFactory;
 }
开发者ID:aenmeyk,项目名称:BrainThud,代码行数:7,代码来源:TableStorageContextFactory.cs

示例13: HomeController

 public HomeController(IRepositoryFactory repositoryFactory, IMapDataService mapService)
 {
     Contract.Requires(repositoryFactory != null);
     Contract.Requires(mapService != null);
     _repositoryFactory = repositoryFactory;
     _mapService = mapService;
 }
开发者ID:hankbeasley,项目名称:hoahome,代码行数:7,代码来源:HomeController.cs

示例14: ImportService

		public ImportService(IImportRepository importRepository, IAssetService blobProvider, ICatalogRepository catalogRepository, IOrderRepository orderRepository, IAppConfigRepository appConfigRepository, IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory)
		{
			_orderRepository = orderRepository;
			_catalogRepository = catalogRepository;
			_importJobRepository = importRepository;
			_appConfigRepository = appConfigRepository;
			_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(_catalogRepository),
					new AssociationImporter(_catalogRepository),
					new RelationImporter(_catalogRepository),
					new CategoryImporter(),
					new LocalizationImporter(),
					new TaxValueImporter(),
					new ItemAssetImporter(),
					new TaxCategoryImporter(),
					new JurisdictionImporter(),
					new JurisdictionGroupImporter(),
					new SeoImporter()
				};

			_importResults = new Dictionary<string, ImportResult>();
		}
开发者ID:Wdovin,项目名称:vc-community,代码行数:31,代码来源:ImportService.cs

示例15: SynchronizationService

 public SynchronizationService(IRepositoryFactory repositoryFactory)
 {
     _repositoryFactory = repositoryFactory;
     _resolver.Add(SynchronizationType.Get, Get);
     _resolver.Add(SynchronizationType.Post, Post);
     _resolver.Add(SynchronizationType.Both, Both);
 }
开发者ID:vynogradskyi,项目名称:EarnIt,代码行数:7,代码来源:SynchronizationService.cs


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