public async Task <IEnumerable <TestData> > GetAsyncSimpleDataSync(string name)
        {
            string repoType = name;

            repo = TestRepoFactory.GetRepoFromString(repoType);
            return(await Task.Run(() => repo.All()));
        }
        public async Task <IEnumerable <TestData> > GetAsyncSimpleDataASync(string name)
        {
            string repoType = name;

            repo = TestRepoFactory.GetRepoFromString(repoType, Request.GetQueryNameValuePairs().Any(x => x.Key == "usestats"));
            return(await repo.AllAsync());
        }
Пример #3
0
        public ProductsController(ITestRepo someRepo)
        {
            _someRepo = someRepo;

            _catalogService = ServiceProxy.Create <IProductCatalogService>(
                new Uri("fabric:/ECommerce/ECommerce.ProductCatalog"),
                new ServicePartitionKey(0));
        }
        public StatusModule(ITestRepo testRepo)
        {
            _testRepo = testRepo;

            Get["/test"]        = _ => _testRepo.GetSomeThing();
            Get["/status"]      = _ => "OK";
            Get["/status/{id}"] = _ => "OK " + _.id;
        }
Пример #5
0
 public AdminController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager,
                        INotificationRepo notificationRepo, ITestRepo testRepo)
 {
     _userManager    = userManager;
     _roleManager    = roleManager;
     this.notifyRepo = notificationRepo;
     this.testRepo   = testRepo;
 }
Пример #6
0
 public HomeController(IHostingEnvironment environment, UserManager <ApplicationUser> userManager, IConfigurationRoot configuration, INotificationRepo notificationRepo, ITestRepo testRepo)
 {
     this._environment = environment;
     this._userManager = userManager;
     this._location    = configuration.GetSection("Environment")["Storage"];
     this.testRepo     = testRepo;
     this.notifyRepo   = notificationRepo;
 }
Пример #7
0
 public TestService(
     ITestRepo testRepo,
     IResponseRepo responseRepo,
     IQuestionRepo questionRepo,
     ITestQuesRepo testQuesRepo
     )
 {
     _testRepo     = testRepo;
     _responseRepo = responseRepo;
     _questionRepo = questionRepo;
     _testQuesRepo = testQuesRepo;
 }
Пример #8
0
 public TestService(ITestRepo repository)
 {
     _repository = repository;
 }
Пример #9
0
 public PlayersController(ITestRepo repo)
 {
     _repo = repo;
 }
Пример #10
0
 public TestsController(ITestRepo repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
 /*lothnic1: DI Ctor for loose coupling of Database Repository, theoretically a hard dependency would make sense for data repositories ->
  * rebuild to CTOR-DI. (Lazy-Binding Data Repository Manager that delivers needed Repo-Ctor).*/
 public ValuesController(ITestRepo testRepo)
 {
     _testRepo = testRepo;
 }
 //lothnic1: Ctor without DI for Unit-Tests
 public ValuesController()
 {
     _testRepo = new TestRepo();
 }
Пример #13
0
 public HomeController(ILogger <HomeController> logger, ITestRepo iTestRepo)
 {
     _logger    = logger;
     _ITestRepo = iTestRepo;
 }
 public async Task<IEnumerable<TestData>> GetAsyncSimpleDataASync(string name)
 {
     string repoType = name;
     repo = TestRepoFactory.GetRepoFromString(repoType, Request.GetQueryNameValuePairs().Any(x => x.Key == "usestats"));
     return await repo.AllAsync();
 }
 public IEnumerable<TestData> GetSyncSimpleDataSync(string name)
 {
     string repoType = name;
     repo = TestRepoFactory.GetRepoFromString(repoType, Request.GetQueryNameValuePairs().Any(x=>x.Key=="usestats"));
     return repo.All();
 }
Пример #16
0
 public TestService(ITestRepo testRepo)
 {
     _testRepo = testRepo;
 }
 private void ResetRepositories()
 {
     _testRepo = null;
 }
 public async Task<IEnumerable<TestData>> GetAsyncSimpleDataSync(string name)
 {
     string repoType = name;
     repo = TestRepoFactory.GetRepoFromString(repoType);
     return await Task.Run(() => repo.All());
 }
Пример #19
0
 // Takes Repository From UI Layer
 public Test_BL(ITestRepo repo) => Repo = repo;
Пример #20
0
 public HomeController(ILogger <HomeController> logger, ITestRepo iTestRepo, IMapper mapper)
 {
     _logger    = logger;
     _ITestRepo = iTestRepo;
     _mapper    = mapper;
 }
Пример #21
0
 public TestService(ILoggingService log, ITestRepo repo) : base(log)
 {
     _repo = repo;
 }