private OtherStepDto GetOthersStepDto(Misc misc) { var otherDto = _otherElasticsearch.Search(misc.Name, 0, 1).FirstOrDefault(); if (otherDto == null) { otherDto = new OtherDto { Name = misc.Name, Custom = true, }; otherDto = _otherService.Add(otherDto); } ; var otherStepDto = Mapper.Map <OtherDto, OtherStepDto>(otherDto); double amount = string.IsNullOrEmpty(misc.Amount) ? 0 : double.Parse(misc.Amount, CultureInfo.InvariantCulture); otherStepDto.Amount = (int)Math.Round(amount * 1000, 0); return(otherStepDto); }