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)); }
public async Task SaveAsync(Tax tax) { await _taxRepository.AddAsync(tax); await _unitOfWork.CompleteAsync(); }