Exemple #1
0
        public async Task <IActionResult> Get()
        {
            var taxes = await _repository.AllAsync();

            MunicipalityTax a = new MunicipalityTax {
                Id = Guid.NewGuid(), Name = "Vilnius", Daily = new DailyTax {
                    Value = 0.2, Dates = new List <DateTime> {
                        DateTime.Parse("2020.01.01")
                    }
                }
            };

            await _repository.AddAsync(a);

            if (taxes == null || !taxes.Any())
            {
                return(NotFound("No tax data found"));
            }

            return(Ok(taxes));
        }