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()); }
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; }
public AdminController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, INotificationRepo notificationRepo, ITestRepo testRepo) { _userManager = userManager; _roleManager = roleManager; this.notifyRepo = notificationRepo; this.testRepo = testRepo; }
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; }
public TestService( ITestRepo testRepo, IResponseRepo responseRepo, IQuestionRepo questionRepo, ITestQuesRepo testQuesRepo ) { _testRepo = testRepo; _responseRepo = responseRepo; _questionRepo = questionRepo; _testQuesRepo = testQuesRepo; }
public TestService(ITestRepo repository) { _repository = repository; }
public PlayersController(ITestRepo repo) { _repo = repo; }
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(); }
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(); }
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()); }
// Takes Repository From UI Layer public Test_BL(ITestRepo repo) => Repo = repo;
public HomeController(ILogger <HomeController> logger, ITestRepo iTestRepo, IMapper mapper) { _logger = logger; _ITestRepo = iTestRepo; _mapper = mapper; }
public TestService(ILoggingService log, ITestRepo repo) : base(log) { _repo = repo; }