- FreeSql.Generator 类型映射容错判断;

This commit is contained in:
28810
2019-12-22 01:15:38 +08:00
parent a17917e172
commit 35829f9010
3 changed files with 38 additions and 12 deletions

View File

@ -83,6 +83,21 @@ public class g
.Build());
public static IFreeSql dameng => damemgLazy.Value;
static Lazy<IFreeSql> gbaseLazy = new Lazy<IFreeSql>(() => new FreeSql.FreeSqlBuilder()
.UseConnectionString(FreeSql.DataType.OdbcDameng, "Driver={DM8 ODBC DRIVER};Server=127.0.0.1:5236;Persist Security Info=False;Trusted_Connection=Yes;UID=USER1;PWD=123456789")
//.UseConnectionFactory(FreeSql.DataType.OdbcDameng, () => new System.Data.Odbc.OdbcConnection("Driver={DM8 ODBC DRIVER};Server=127.0.0.1:5236;Persist Security Info=False;Trusted_Connection=Yes;UID=USER1;PWD=123456789"))
.UseAutoSyncStructure(true)
.UseLazyLoading(true)
.UseSyncStructureToUpper(true)
//.UseNoneCommandParameter(true)
.UseMonitorCommand(
cmd => Trace.WriteLine(cmd.CommandText), //监听SQL命令对象在执行前
(cmd, traceLog) => Console.WriteLine(traceLog))
.Build());
public static IFreeSql gbase => gbaseLazy.Value;
//启动神州通用数据库 /etc/init.d/oscardb_OSRDBd start
//SYSDBA 密码 szoscar55