/* This function was written by Lennart de Waart (563079) */
        /// <summary>
        /// Asynchronous method that checks if a location with the passed latitude and longitude exists in the database.
        /// </summary>
        /// <param name="latitude"></param>
        /// <param name="longitude"></param>
        /// <param name="isWarehouse"></param>
        /// <returns>true or false</returns>
        public async Task <bool> DoesLocationExist(double latitude, double longitude, bool isWarehouse)
        {
            try
            {
                _logger.Information($"A request has been made to check if a Location with latitude {latitude} and longitude {longitude} exists in the context.");
                bool result = await _locationsRepo.DoesLocationExist(latitude, longitude, isWarehouse);

                return(result);
            }
            catch (Exception e) // Error handling
            {
                _logger.Error($"ILocationsService says: {e.Message} Exception occured on line {new StackTrace(e, true).GetFrame(0).GetFileLineNumber()}.");
                return(false);
            }
        }