public async Task <IActionResult> Post(
            [HttpTrigger(AuthorizationLevel.Function, "post", Route = "queries")] HttpRequest req,
            ILogger log)
        {
            log.LogInformation("C# HTTP trigger function processed a request.");
            if (req == null)
            {
                return(new NotFoundObjectResult("Null HttpRequest"));
            }

            string requestBody = await _readerService.ReadToEndAsync(req.Body);

            if (string.IsNullOrEmpty(requestBody))
            {
                return(new BadRequestObjectResult("Could not find Start Date or End date"));
            }

            var data = _jsonConverter.DeserializeObject <VehicleQueryRequest>(requestBody);

            if (data == null)
            {
                return(new BadRequestObjectResult("VehicleQueryrequest is null after deserialization"));
            }

            try
            {
                var result = await _vehicleQueryService.GetByDate(data.StartDate, data.EndDate);

                //Send Email
                var msg = _emailService.Create(result);
                if (msg == null)
                {
                    log.LogWarning("Error creating Email");
                }
                var response = await _emailService.Send(msg);

                log.LogInformation($"Output Response: {response.Success} - {response.Message}. Number of Queries: {result.NumberOfQueries}");

                return(new OkObjectResult(result));
            }
            catch (Exception e)
            {
                log.LogInformation($"Exception occured. {e.Message}");
                throw e;
            }
        }