private void InitializeServices() { try { logger.LogNewMessage($"Initializing service providers.", LogType.INFO); countryService = new CountryServiceProvider(ServerLogger.GetOrCreate(), GetDatabaseContextFactory()); placeService = new PlaceServiceProvider(ServerLogger.GetOrCreate(), GetDatabaseContextFactory()); roadService = new RoadServiceProvider(ServerLogger.GetOrCreate(), GetDatabaseContextFactory()); stationService = new StationServiceProvider(ServerLogger.GetOrCreate(), GetDatabaseContextFactory()); trackService = new TrackServiceProvider(ServerLogger.GetOrCreate(), GetDatabaseContextFactory()); userService = new UserServiceProvider(ServerLogger.GetOrCreate(), GetDatabaseContextFactory()); }catch (Exception ex) { logger.LogNewMessage($"Error occured initializing service providers. ERROR {ex.Message}", LogType.ERROR); } }