public async Task AddAsync_Gets_Added()
        {
            var newFermentable = new Fermentable {
                Name = "newFermentable" + DateTime.Now.Ticks, Type = "Grain", Custom = true
            };
            await _fermentableRepository.AddAsync(newFermentable);

            var fermentables = await _fermentableRepository.GetAllAsync(0, 20);

            Assert.True(fermentables.Any(o => o.Name == newFermentable.Name));
        }
        public async Task <FermentableDto> AddAsync(FermentableDto fermentableDto)
        {
            var fermantable = AutoMapper.Mapper.Map <FermentableDto, Fermentable>(fermentableDto);
            await _fermentableRepository.AddAsync(fermantable);

            var result = await _fermentableRepository.GetSingleAsync(fermantable.FermentableId);

            var mappedResult = AutoMapper.Mapper.Map <Fermentable, FermentableDto>(result);
            await _fermentableElasticsearch.UpdateAsync(mappedResult);

            return(mappedResult);
        }