是否可以支持 Snowflake DB? #1570
xingwen1987
started this conversation in
Ideas
Replies: 1 comment
-
var fsql = new FreeSqlBuilder()
.UseConnectionFactory(DataType.CustomMySql, () => new SnowflakeDbConnection(...)) FreeSql.Provider.Custom 提供了这四种数据库适配,并且支持 CodeFirst/DbFirst 以及完整的 FreeSql 功能。 FreeSql.Provider.Custom 不依赖具体 ado.net/odbc/oledb dll 驱动,使用者在外部自行引用 dll 驱动。 访问 MySql 数据库为例: var fsql = new FreeSqlBuilder()
.UseConnectionFactory(DataType.CustomMySql, () =>
new MySqlConnection("Data Source=..."))
.UseNoneParameter(true)
.UseMonitorCommand(Console.WriteLine(cmd.CommandText))
.Build();
fsql.SetDbProviderFactory(MySqlConnectorFactory.Instance); 若某国产数据库兼容 MySql SQL,先引用对方提供的 DLL,然后:
提示:对方 DLL 一般都会提供这两个现实类 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
是否可以支持 Snowflake DB?
Beta Was this translation helpful? Give feedback.
All reactions