- 增加 达梦数据库 ODBC 适配,和单元测试,支持 CodeFirst 模式开发;

This commit is contained in:
28810
2019-12-09 21:25:01 +08:00
parent cc585b4cd5
commit 206d7bdbe0
46 changed files with 10682 additions and 17 deletions

View File

@ -62,4 +62,17 @@ public class g
.UseLazyLoading(true)
.Build());
public static IFreeSql odbc => odbcLazy.Value;
static Lazy<IFreeSql> damemgLazy = 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")
.UseAutoSyncStructure(true)
.UseLazyLoading(true)
.UseSyncStructureToUpper(true)
//.UseNoneCommandParameter(true)
.UseMonitorCommand(
cmd => Trace.WriteLine(cmd.CommandText), //监听SQL命令对象在执行前
(cmd, traceLog) => Console.WriteLine(traceLog))
.Build());
public static IFreeSql dameng => damemgLazy.Value;
}