Beispiel #1
0
 private static string GetDatabasePath(TargetVersion version, DatabaseLocation location)
 {
     return(Path.Combine(Path.GetTempPath(), $"cmp_{version.VersionSuffix()}_{location}.fdb"));
 }
Beispiel #2
0
 private static string GetFirebirdLocation(TargetVersion version)
 {
     return(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "_Firebird", version.VersionSuffix()));
 }
Beispiel #3
0
            public static string GetConnectionString(TargetVersion version, DatabaseLocation location)
            {
                var builder =
                    new FbConnectionStringBuilder
                {
                    Database      = GetDatabasePath(version, location),
                    UserID        = "sysdba",
                    Password      = "******",
                    ServerType    = FbServerType.Embedded,
                    ClientLibrary = Path.Combine(GetFirebirdLocation(version), $"fbclient{version.VersionSuffix()}.dll"),
                    Charset       = "utf8",
                    Pooling       = false,
                };

                return(builder.ToString());
            }