如何在不使用Entity Framework和ADO.NET的情况下将数据库连接到MVC? [英] How to connect Database to MVC without using Entity Framework and ADO.NET?

查看:93
本文介绍了如何在不使用Entity Framework和ADO.NET的情况下将数据库连接到MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Pals ..如何在不使用Entity Framework和ADO.NET的情况下将MVC连接到数据库?

任何链接或建议或信息都将受到高度赞赏。

Hi Pals.. How to connect MVC to database without using Entity Framework and ADO.NET?
Any Link or suggestion or information would be highly appreciated.

推荐答案

不使用EF而且没有ado.net?你可以使用ODBC库,但你最好坚持使用ado.net。 ado.net是连接数据库的最基本的.net框架,所以你应该使用它,没有任何问题。



如果你的意思是没有EF而且只是ado.net,然后只使用ado.net而不是使用EF。很多示例和示例在线可能会使用EF,因为代码编写起来更快并且使示例保持简单,但是如果您愿意,可以使用ado.net,只需执行此操作。
Without using EF and also without ado.net? You could use ODBC libraries but you're seriously better sticking to ado.net. ado.net is the most basic .net framework for connecting to databases so you should use it, there is nothing wrong with it.

If you mean without EF and just ado.net, then just use ado.net rather than using EF. A lot of examples and samples on-line might use EF because the code is quicker to write and keeps the sample simple, but you can use ado.net if you want to instead, just do it.


这篇关于如何在不使用Entity Framework和ADO.NET的情况下将数据库连接到MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆