Пример #1
0
 public IngredientService(IHopService hopService, IFermentableService fermentableService,
                          IOtherService otherService, IYeastService yeastService, IIngredientElasticsearch ingredientElasticsearch)
 {
     _hopService              = hopService;
     _fermentableService      = fermentableService;
     _otherService            = otherService;
     _yeastService            = yeastService;
     _ingredientElasticsearch = ingredientElasticsearch;
 }
 public void Init()
 {
     TestUtil.FlushRedisStore();
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context = new MicrobrewitContext();
     _repository = new YeastRepository();
     _yeastElasticsearch = new YeastElasticsearch();
     _yeastService = new YeastService(_repository,_yeastElasticsearch);
     _controller = new YeastController(_yeastService);
     _node = new Uri("http://localhost:9200");
     _settings = new ConnectionSettings(_node, defaultIndex: Setting.ElasticSearchIndex);
     _client = new ElasticClient(_settings);
 }
Пример #3
0
 public void Init()
 {
     TestUtil.FlushRedisStore();
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context            = new MicrobrewitContext();
     _repository         = new YeastRepository();
     _yeastElasticsearch = new YeastElasticsearch();
     _yeastService       = new YeastService(_repository, _yeastElasticsearch);
     _controller         = new YeastController(_yeastService);
     _node     = new Uri("http://localhost:9200");
     _settings = new ConnectionSettings(_node, defaultIndex: Setting.ElasticSearchIndex);
     _client   = new ElasticClient(_settings);
 }
Пример #4
0
 public YeastsController(IYeastService yeastService, ILogger <YeastsController> logger)
 {
     _yeastService = yeastService;
     _logger       = logger;
 }
Пример #5
0
 public YeastController(IYeastService yeastService)
 {
     _yeastService = yeastService;
 }
Пример #6
0
 public YeastController(IYeastService service) : base(service)
 {
 }
Пример #7
0
 public YeastController(IYeastService yeastService)
 {
     _yeastService = yeastService;
 }