本文整理汇总了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"));
}
示例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>();
}
示例3: AdminProjectService
public AdminProjectService(IRepositoryFactory repositoryFactory, IUserRepository userRepository, IProductWriterForAdmin productWriterForAdmin, IFileSystem fileSystem)
{
_projectRepository = repositoryFactory.Create<ProjectEntity>();
_userRepository = userRepository;
_productWriterForAdmin = productWriterForAdmin;
_fileSystem = fileSystem;
}
示例4: EmailSenderService
public EmailSenderService(
IRepositoryFactory repositoryFactory,
IMailerRepository mailerRepository,
IMapper mapper)
{
_mailerRepository = mailerRepository;
_mapper = mapper;
_sendEmailRepository = repositoryFactory.Create<SendEmailEntity>();
}
示例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;
}
示例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();
}
示例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>();
}
示例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>();
}
示例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>();
}
示例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;
}
示例11: LastProjectService
public LastProjectService(IRepositoryFactory repositoryFactory)
{
_projectRepository = repositoryFactory.Create<ProjectEntity>();
}
示例12: FileSystem
public FileSystem(IUserRepository userRepository, IRepositoryFactory repositoryFactory, CloudBlobClient blobClient)
{
_userRepository = userRepository;
_blobClient = blobClient;
_fileRepository = repositoryFactory.Create<FileEntity>();
}