public async Task <IActionResult> Get(DateTime date) { if (date >= new DateTime(2015, 01, 01)) { return(BadRequest(new ErrorResponse("Only dates up to the end of the year 2014 are allowed"))); } else { var rates = await exchangeRateService.GetExchangeRateDifferences(date); return(new OkObjectResult(rates)); } }