C# Lib 查询 MySQL DB
有没有什么好的库来查询 MySQL DB?我安装了 mysql 连接器 .net,它基本上让我替换了 ado.net,如 MySQLCommand、MySQLAdapter 等,
MySqlCommand command = connection.CreateCommand ();
command.CommandText = "select * from samples";
但无论如何你都必须编写大量代码,是否有任何 lib 来包装这个,所以我写了类似
p = MysqlProvider.Connect();
dataSet = p.Execute(query);
或
array = p.Execute(query);
value = p.ExecuteAsValue(query);
ETC?
有什么想法吗?
谢谢, 德米特里
Is there any good nice library to query MySQL DB? I have mysql connector .net installed, and it basically gives me ado.net replaced, like MySQLCommand, MySQLAdapter etc
MySqlCommand command = connection.CreateCommand ();
command.CommandText = "select * from samples";
but you have to write a lot of code anyway, is there any lib, that wraps up this, so I write something like
p = MysqlProvider.Connect();
dataSet = p.Execute(query);
or
array = p.Execute(query);
value = p.ExecuteAsValue(query);
etc?
Any ideas?
Thanks,
Dmitry
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您正在寻找 ORM,请务必通读:https://stackoverflow.com/tags/orm/faq
特别是 您会推荐哪种 .NET ORM?
Sounds like you are looking for an ORM, be sure to read through: https://stackoverflow.com/tags/orm/faq
In particular Which ORM for .NET would you recommend?