namespace TarninaHub.Infrastructure.Settings; public static class SurrealDbEndpoint { /// /// Builds the SurrealDB endpoint. Remote mode uses the configured URL; /// embedded mode uses the RocksDB provider persisted to the data directory /// (forward slashes, so the same endpoint works on Windows and Linux). /// public static string Build(SurrealDbSettings settings) { if (!string.IsNullOrWhiteSpace(settings.RemoteUrl)) { return settings.RemoteUrl; } var dataDirectory = Path.Combine(AppContext.BaseDirectory, settings.DataDirectory); return $"rocksdb://{dataDirectory.Replace('\\', '/')}"; } }