/* This function was written by Bob van Beek (610685) */
        /// <summary>
        /// Asynchronous method which retrieves all Warehouses
        /// </summary>
        /// <returns>Filled Delivery class or null</returns>
        public async Task <List <Models.Location> > GetAllWarehouses()
        {
            try
            {
                _logger.Information($"A request has been made to get all warehouses from the context.");
                List <Models.Location> l = await _locationsRepo.GetAllWarehouses();

                if (l != null)
                {
                    return(l);
                }
                else
                {
                    throw new ArgumentNullException($"Dependency failure: The repository returned null.");
                }
            }
            catch (Exception e) // Error handling
            {
                _logger.Error($"ILocationsService says: {e.Message} Exception occured on line {new StackTrace(e, true).GetFrame(0).GetFileLineNumber()}.");
                return(null);
            }
        }