public static IServiceCollection RegisterEntityFrameworkStore(this IServiceCollection services, Action <DbContextOptionsBuilder> optionsAction) { services.AddStoresDbContext(optionsAction); services.AddScopedWithImplementation <IFileStore, EfFileStore>(); FileStoreFactory.RegisterFileStore <EfFileStore>("ef", true); return(services); }
public static IServiceCollection RegisterGitHubStore(this IServiceCollection services) { services.AddScoped <RepositoryIdCache>(); services.AddScopedWithImplementation <IFileStore, GithubFileStore>(); services.AddScopedWithImplementation <IRepositoryQuery, RepositoryQuery>(); services.AddScopedWithImplementation <ISearchRepositoryQuery, SearchRepositoryQuery>(); services.AddScopedWithImplementation <IBranchService, BranchService>(); FileStoreFactory.RegisterFileStore <GithubFileStore>("git", false); return(services); }