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


C# IRepositoryFactory.Create方法代码示例

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


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

示例1: CommandsDbContext

        public CommandsDbContext(IRepositoryFactory repoFactory, string connectionString, string dbName)
        {
            if (string.IsNullOrWhiteSpace(connectionString))
                throw new ArgumentNullException("connectionString");
            if (string.IsNullOrWhiteSpace(dbName))
                throw new ArgumentNullException("dbName");

            this.Users = repoFactory.Create<User>(new RepositoryOptions(connectionString, dbName, "users"));
            this.Ideas = repoFactory.Create<Idea>(new RepositoryOptions(connectionString, dbName, "ideas"));
            this.IdeaComments = repoFactory.Create<IdeaComment>(new RepositoryOptions(connectionString, dbName, "ideaComments"));
            this.Areas = repoFactory.Create<Area>(new RepositoryOptions(connectionString, dbName, "areas"));
        }
开发者ID:alexestevam,项目名称:UsersVoice,代码行数:12,代码来源:CommandsDbContext.cs

示例2: ProcessedVideoHandler

 public ProcessedVideoHandler(
     IRepositoryFactory repositoryFactory,
     IService<DomainProjectProcessedScreenshot> projectProcessedScreenshotService,
     Lazy<IService<DomainProjectProcessedVideo>> projectProcessedVideoService,
     IMapper mapper)
 {
     _projectProcessedScreenshotService = projectProcessedScreenshotService;
     _projectProcessedVideoServiceLazy = projectProcessedVideoService;
     _mapper = mapper;
     _processedScreenshotRepository = repositoryFactory.Create<ProcessedScreenshotEntity>();
     _processedVideoRepository = repositoryFactory.Create<ProcessedVideoEntity>();
     _videoQueueRepository = repositoryFactory.Create<VideoQueueEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:13,代码来源:ProcessedVideoHandler.cs

示例3: AdminProjectService

 public AdminProjectService(IRepositoryFactory repositoryFactory, IUserRepository userRepository, IProductWriterForAdmin productWriterForAdmin, IFileSystem fileSystem)
 {
     _projectRepository = repositoryFactory.Create<ProjectEntity>();
     _userRepository = userRepository;
     _productWriterForAdmin = productWriterForAdmin;
     _fileSystem = fileSystem;
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:7,代码来源:AdminProjectService.cs

示例4: EmailSenderService

 public EmailSenderService(
     IRepositoryFactory repositoryFactory,
     IMailerRepository mailerRepository,
     IMapper mapper)
 {
     _mailerRepository = mailerRepository;
     _mapper = mapper;
     _sendEmailRepository = repositoryFactory.Create<SendEmailEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:9,代码来源:EmailSenderService.cs

示例5: TaskKeeper

        public TaskKeeper(
            IMapper mapper,
            IRepositoryFactory repositoryFactory,
            IProjectRepository projectRepository,
            IService<DomainProjectProcessedScreenshot> projectProcessedScreenshotService,
            IService<DomainProjectProcessedVideo> projectProcessedVideoService)
        {
            _mapper = mapper;

            _projectRepository = projectRepository;
            _projectProcessedScreenshotService = projectProcessedScreenshotService;
            _projectProcessedVideoService = projectProcessedVideoService;

            _processedScreenshotRepository = repositoryFactory.Create<ProcessedScreenshotEntity>();
            _processedVideoRepository = repositoryFactory.Create<ProcessedVideoEntity>();
            _videoQueueRepository = repositoryFactory.Create<VideoQueueEntity>();

            _lastSave = DateTime.MinValue;
        }
开发者ID:GusLab,项目名称:video-portal,代码行数:19,代码来源:TaskKeeper.cs

示例6: DashboardHandlerBase

        /// <summary>
        /// Initializes a new instance of the DashboardHandlerBase class.
        /// </summary>
        /// <param name="repositoryFactory">The repository factory to use.</param>
        protected DashboardHandlerBase(IRepositoryFactory repositoryFactory)
        {
            if (repositoryFactory == null)
            {
                throw new ArgumentNullException("repositoryFactory", "repositoryFactory cannot be null.");
            }

            this.Helper = new HandlerHelper(this);
            this.Repository = repositoryFactory.Create();
        }
开发者ID:ChadBurggraf,项目名称:blue-collar,代码行数:14,代码来源:DashboardHandlerBase.cs

示例7: CommentService

 public CommentService(IRepositoryFactory repositoryFactory,
     ICommentRepository commentRepository,
     IUserRepository userRepository,
     IAuthenticator authenticator,
     IMapper mapper)
 {
     _commentRepository = commentRepository;
     _userRepository = userRepository;
     _authenticator = authenticator;
     _mapper = mapper;
     _projectRepository = repositoryFactory.Create<ProjectEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:12,代码来源:CommentService.cs

示例8: PasswordRecoveryService

 public PasswordRecoveryService(
     IRepositoryFactory repositoryFactory,
     IUserRepository userRepository,
     IMailerRepository mailerRepository,
     IPasswordRecoveryFactory passwordRecoveryFactory,
     IPortalFrontendSettings settings,
     IRecoveryLinkService recoveryLinkService,
     IPasswordService passwordService)
 {
     _userRepository = userRepository;
     _passwordRecoveryFactory = passwordRecoveryFactory;
     _settings = settings;
     _recoveryLinkService = recoveryLinkService;
     _passwordService = passwordService;
     _mailerRepository = mailerRepository;
     _passwordRecoverRepository = repositoryFactory.Create<PasswordRecoveryEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:17,代码来源:PasswordRecoveryService.cs

示例9: EmailNotificationService

 public EmailNotificationService(
     IRepositoryFactory repositoryFactory,
     IEmailSenderService emailSenderService,
     IPortalFrontendSettings settings,
     IUserService userService,
     IProductIdExtractor productIdExtractor,
     IProjectUriProvider projectUriProvider,
     IUserUriProvider userUriProvider)
 {
     _emailSenderService = emailSenderService;
     _settings = settings;
     _productIdExtractor = productIdExtractor;
     _userService = userService;
     _projectUriProvider = projectUriProvider;
     _userUriProvider = userUriProvider;
     _emailRepository = repositoryFactory.Create<SendEmailEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:17,代码来源:EmailNotificationService.cs

示例10: AdminUserService

 public AdminUserService(
     IRepositoryFactory repositoryFactory,
     IUserRepository userRepository,
     IProjectRepository projectRepository,
     IPasswordService passwordService,
     IProjectService projectService,
     IProductWriterForAdmin productWriterForAdmin,
     IMapper mapper)
 {
     _userRepository = userRepository;
     _passwordService = passwordService;
     _projectService = projectService;
     _productWriterForAdmin = productWriterForAdmin;
     _mapper = mapper;
     _fileRepository = repositoryFactory.Create<FileEntity>();
     _projectRepository = projectRepository;
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:17,代码来源:AdminUserService.cs

示例11: LastProjectService

 public LastProjectService(IRepositoryFactory repositoryFactory)
 {
     _projectRepository = repositoryFactory.Create<ProjectEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:4,代码来源:LastProjectService.cs

示例12: FileSystem

 public FileSystem(IUserRepository userRepository, IRepositoryFactory repositoryFactory, CloudBlobClient blobClient)
 {
     _userRepository = userRepository;
     _blobClient = blobClient;
     _fileRepository = repositoryFactory.Create<FileEntity>();
 }
开发者ID:GusLab,项目名称:video-portal,代码行数:6,代码来源:FileSystem.cs


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