使用DBML访问数据库 [英] Database access using DBML

查看:282
本文介绍了使用DBML访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我以前使用System.SqlClient,System.Data ..等数据库对象从我的asp.net代码访问数据库..

现在我是通过.dbml文件访问数据库。我觉得这在开发时更容易。

我需要知道这两者在性能方面有什么区别。哪个会表现更好?



谢谢你

ypki

解决方案

这是不容易对此发表评论。这完全取决于你的应用程序设计。



一般来说,LINQ2SQL可以减少开发工作量,而可能不如你自己的数据层那么好。


您好,



LINQ2SQL是一个ORM工具,可以帮助您实现域模型概念。所以,如果您正在开发大型项目,并希望在项目中实现域模型,那么您可以考虑使用ORM工具。



PS微软没有做任何事情LINQ2SQL项目的进一步开发,而不是他们更专注于EF(实体框架),所以如果你打算学习ORM工具,那么你应该研究EF4而不是LINQ2SQL。



希望这些信息对您有所帮助。



快乐编程。

:)

Hi,
I previously accessing database from my asp.net code using database objects like System.SqlClient, System.Data ..etc..
Now i am accessing database thru .dbml file.I feel this is more easy at development time.
I need to know what is the difference between this two in terms of performance. Which will perform more?

Thankyou
ypki

解决方案

It is not easy to comment on this. It totally depends on your application design.

In general, LINQ2SQL reduces development effort while it may not perform as good as your own data layer.


Hi,

LINQ2SQL is an ORM tool which will help you to implement the domain model concept. So basicall if you are working on large project and you want to implement the domain model in your project then you can think for ORM tools.

P.S Microsoft is not doing any further development on the LINQ2SQL project rather they are more focused on EF(Entity Framework) so if you are intended to learn ORM tools then instead of LINQ2SQL you should look into EF4.

Hope this information will help you.

Happy Programming.
:)


这篇关于使用DBML访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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