public async Task <IHttpActionResult> Get([FromUri] SearchTaskDto searchTaskDto)
        {
            var tax = await _taxesService.GetTax(searchTaskDto);

            if (tax == null)
            {
                return(BadRequest("No taxes for this date have been found"));
            }

            return(Ok(tax));
        }
示例#2
0
        public async Task <IActionResult> GetTax(string municipalityName, DateTime date)
        {
            var tax = await Task.Run(() => _service.GetTax(municipalityName, date));

            if (tax == null)
            {
                return(NotFound());
            }

            return(Ok(tax));
        }