mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-05-05 00:22:50 +08:00
21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
case DataType.Firebird:
|
||
type = Type.GetType("FreeSql.Firebird.FirebirdProvider`1,FreeSql.Provider.Firebird")?.MakeGenericType(typeof(TMark));
|
||
if (type == null) throwNotFind("FreeSql.Provider.Firebird.dll", "FreeSql.Firebird.FirebirdProvider<>");
|
||
break;
|
||
|
||
|
||
|
||
|
||
static Lazy<IFreeSql> firebirdLazy = new Lazy<IFreeSql>(() => new FreeSql.FreeSqlBuilder()
|
||
.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
|
||
//.UseConnectionFactory(FreeSql.DataType.Firebird, () => new FirebirdSql.Data.FirebirdClient.FbConnection(@"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5"))
|
||
.UseAutoSyncStructure(true)
|
||
.UseLazyLoading(true)
|
||
.UseNameConvert(FreeSql.Internal.NameConvertType.ToUpper)
|
||
//.UseNoneCommandParameter(true)
|
||
|
||
.UseMonitorCommand(
|
||
cmd => Trace.WriteLine(cmd.CommandText), //监听SQL命令对象,在执行前
|
||
(cmd, traceLog) => Console.WriteLine(traceLog))
|
||
.Build());
|
||
public static IFreeSql firebird => firebirdLazy.Value; |