示例#1
0
        public async Task <IEnumerable <IIngredientDto> > GetAllAsync(string custom)
        {
            var ingredients = new List <IIngredientDto>();

            ingredients.AddRange(await _hopService.GetAllAsync(0, 100000));
            ingredients.AddRange(await _fermentableService.GetAllAsync(0, 10000, custom));
            ingredients.AddRange(await _otherService.GetAllAsync(custom));
            ingredients.AddRange(await _yeastService.GetAllAsync());
            return(ingredients);
        }
示例#2
0
        public async Task <HopCompleteDto> GetHops(int from = 0, int size = 20)
        {
            _logger.LogDebug("Api Url:" + ApiConfiguration.ApiSettings.Url);
            if (size > 1000)
            {
                size = 1000;
            }
            var hops = await _hopService.GetAllAsync(from, size);

            return(new HopCompleteDto {
                Hops = hops
            });
        }