Redian新闻
>
asp.net为啥用linq来操作数据库呢,为啥不直接用sql语言?
avatar
p*t
2
就象php一样,直接用sql语言,select...什么的。
linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
独特。
avatar
s*l
3
我只听了《分生》和《阿密特》,分生还不错,阿密特一般,阿妹在MV里面的造型太难看

【在 V*********n 的大作中提到】
: 出来有一阵子了。verycd上有320k的mp3版本的,普通版本的这里可以下载:
: http://uploading.com/files/GTK8MDK8/A-Mei-Chang.rar.html
: 我本来都没什么特别的兴趣了,看了昨天的王牌大明星,觉得还是应该仔细听听。
: 青峰写的那首不错。

avatar
a9
4
System.Data

【在 p*********t 的大作中提到】
: 就象php一样,直接用sql语言,select...什么的。
: linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
: 独特。

avatar
l*e
5
我比你多听一首《掉了》,比较喜欢这个

难看

【在 s******l 的大作中提到】
: 我只听了《分生》和《阿密特》,分生还不错,阿密特一般,阿妹在MV里面的造型太难看
avatar
S*e
6
也可以直接操作
我一直是直接操作,没什么问题
后来发现一个随机+distinct的问题
直接操作要写很长,据版上的高人说linq很简单
可能linq包含了更加复杂的功能

【在 p*********t 的大作中提到】
: 就象php一样,直接用sql语言,select...什么的。
: linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
: 独特。

avatar
s*l
7
这个青峰是苏打绿那个?

【在 V*********n 的大作中提到】
: 出来有一阵子了。verycd上有320k的mp3版本的,普通版本的这里可以下载:
: http://uploading.com/files/GTK8MDK8/A-Mei-Chang.rar.html
: 我本来都没什么特别的兴趣了,看了昨天的王牌大明星,觉得还是应该仔细听听。
: 青峰写的那首不错。

avatar
D*y
8
没说你非要用linq, 你愿意用sqlcommand完全可以阿。
但是类似linq这样的,减少run time error, 很多错误都在compile时间就发现了。

【在 p*********t 的大作中提到】
: 就象php一样,直接用sql语言,select...什么的。
: linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
: 独特。

avatar
V*n
9
是滴。

【在 s******l 的大作中提到】
: 这个青峰是苏打绿那个?
avatar
p*t
10
觉得linq的语法狠怪异,用得不爽。

【在 D******y 的大作中提到】
: 没说你非要用linq, 你愿意用sqlcommand完全可以阿。
: 但是类似linq这样的,减少run time error, 很多错误都在compile时间就发现了。

avatar
f*e
11
用asp.net 1.1的表示没有压力。

【在 p*********t 的大作中提到】
: 就象php一样,直接用sql语言,select...什么的。
: linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
: 独特。

avatar
H*g
12
习惯了你就爱上他了。
avatar
p*t
13
感觉就是被动用哪些,倒没有爱上的感觉。

【在 H*******g 的大作中提到】
: 习惯了你就爱上他了。
avatar
a*9
14
不用linq, 你如何实现table map object?
avatar
H*g
15
Entity Framework dude

【在 a****9 的大作中提到】
: 不用linq, 你如何实现table map object?
avatar
w*d
16
呵呵,这个绝对的。
不过好奇的很 - 1.1现在应该是古董级了吧?还要维护?

【在 f*****e 的大作中提到】
: 用asp.net 1.1的表示没有压力。
avatar
s*o
17
Speaking of EF, I am so tired of its lack of features. But right before I
put it aside and switch to nhibernate, suddenly it's open sourced. I guess I
will stick to it a little longer to see if it can catch up quickly.

【在 H*******g 的大作中提到】
: Entity Framework dude
avatar
H*g
18
nhibernate我也用过,感觉换汤不换药啊。。。我个人比较看好EF,呵呵。

I

【在 s***o 的大作中提到】
: Speaking of EF, I am so tired of its lack of features. But right before I
: put it aside and switch to nhibernate, suddenly it's open sourced. I guess I
: will stick to it a little longer to see if it can catch up quickly.

avatar
f*e
19
I used both EF and nHibernate. I feel nHiberate is worse than EF.

I

【在 s***o 的大作中提到】
: Speaking of EF, I am so tired of its lack of features. But right before I
: put it aside and switch to nhibernate, suddenly it's open sourced. I guess I
: will stick to it a little longer to see if it can catch up quickly.

avatar
s*o
20
more details please?

【在 f*****e 的大作中提到】
: I used both EF and nHibernate. I feel nHiberate is worse than EF.
:
: I

avatar
C*n
21
你应该是新手吧.
当MS 发布 LINQ的时候, 我都激动的不得了, 我自己做了好几年仿LINQ的东西, 可是由
于COMPILER的限制, 一直没有最优化. 有了LINQ以后, 连夜把我的所有SQL ACCESS 改
成LINQ TO SQL了.
Linq can solve 95% of daily SQL access, with the same performance as direct
SQL statement or SQL stored procedure.
There're something Linq 2 SQL simply can't do, then you fall back to SQL
statement or stored procedure.
But you should always use Linq to SQL when you can.
Build an application is easy, maintain and enhance an application is
difficult. Linq is here to ease the pain, to help you build applications
easier to maintain.
LinQ is not for performance.
If you don't feel how important maintaining an application is yet, you are
still too green a developer.

【在 p*********t 的大作中提到】
: 就象php一样,直接用sql语言,select...什么的。
: linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
: 独特。

avatar
C*n
22
And using SQL statement directly in code is a BAD practice, I have to yell
at my developers every time they do that. It's strictly forbidden, and you
should never DO that if you want to be a good developer.

【在 p*********t 的大作中提到】
: 就象php一样,直接用sql语言,select...什么的。
: linq的操作数据库的语法的格式,实在是和sql语言相差甚远。一个first()让我觉得好
: 独特。

avatar
p*t
23
php不就是这么做的吗?

【在 C****n 的大作中提到】
: And using SQL statement directly in code is a BAD practice, I have to yell
: at my developers every time they do that. It's strictly forbidden, and you
: should never DO that if you want to be a good developer.

avatar
p*t
24
沒有你的20年那么长。惭愧,哈哈。
現在不是有ado.net了吗?

direct

【在 C****n 的大作中提到】
: 你应该是新手吧.
: 当MS 发布 LINQ的时候, 我都激动的不得了, 我自己做了好几年仿LINQ的东西, 可是由
: 于COMPILER的限制, 一直没有最优化. 有了LINQ以后, 连夜把我的所有SQL ACCESS 改
: 成LINQ TO SQL了.
: Linq can solve 95% of daily SQL access, with the same performance as direct
: SQL statement or SQL stored procedure.
: There're something Linq 2 SQL simply can't do, then you fall back to SQL
: statement or stored procedure.
: But you should always use Linq to SQL when you can.
: Build an application is easy, maintain and enhance an application is

avatar
S*e
25
高深!

direct

【在 C****n 的大作中提到】
: 你应该是新手吧.
: 当MS 发布 LINQ的时候, 我都激动的不得了, 我自己做了好几年仿LINQ的东西, 可是由
: 于COMPILER的限制, 一直没有最优化. 有了LINQ以后, 连夜把我的所有SQL ACCESS 改
: 成LINQ TO SQL了.
: Linq can solve 95% of daily SQL access, with the same performance as direct
: SQL statement or SQL stored procedure.
: There're something Linq 2 SQL simply can't do, then you fall back to SQL
: statement or stored procedure.
: But you should always use Linq to SQL when you can.
: Build an application is easy, maintain and enhance an application is

avatar
H*g
26
老兄,你这顺序似乎错了吧?早就有ADO.NET了。。。。

【在 p*********t 的大作中提到】
: 沒有你的20年那么长。惭愧,哈哈。
: 現在不是有ado.net了吗?
:
: direct

avatar
C*n
27
This is the weak point of PHP.

【在 p*********t 的大作中提到】
: php不就是这么做的吗?
avatar
r*o
28
我用过的ORM
MS的typed Dataset, LINQ2SQL, Entity Framework
Telerik的OpenAccess
MS的ORM都很Solid,没有什么bug可以放心用
avatar
C*n
29
不是没BUG就能用的. 要考虑灵活性, 稳定性, PERFORMANCE, 还有对我来说最重要的,
"不易出错性".
所谓不易出错性就是:
1. 程序员容易学 (这个不是你学会就行了, 你的TEAM也得学).
2. 程序员不易犯错误. 你自己试一下, 是不是一不小心就犯了错误了?然后骂自己不小
心? 其实不是你不小心, 因为这个工具设计的不合理.
就算你很小心从不犯错误, 但当你把这个工具推广给整个TEAM的时候, 别人可不会象你
那么小心了. 出了BUG到DEPLOY之后才发现就很惨. 然后你又不能骂你的DEVELOPER, 因
为那个确实很TRICKY啊. VB 那么流行就是这个原因. 因C太容易出错了.
综合以上所有条件我用LinQ2SQL, 然后是EF. 千万别用 Typed Dataset, 不知道哪个MS
的傻逼弄个这玩意出来.

【在 r***o 的大作中提到】
: 我用过的ORM
: MS的typed Dataset, LINQ2SQL, Entity Framework
: Telerik的OpenAccess
: MS的ORM都很Solid,没有什么bug可以放心用

avatar
a*9
30
直接在code里用SQL statement有那么糟糕吗?我觉得当发生runtime erro 的时候,
sql statement 比Linq 还容易排查呢

【在 C****n 的大作中提到】
: And using SQL statement directly in code is a BAD practice, I have to yell
: at my developers every time they do that. It's strictly forbidden, and you
: should never DO that if you want to be a good developer.

avatar
r*o
31
一个component内部有bug,花很多时间debug最后发现是component内部
的问题,再换都来不及了,这非常致命
如果一个工具只是tricky难用的话那开始就不会选
另外typed dataset很好用啊,在2.0时代比自己写的ORM强太多了

,
MS

【在 C****n 的大作中提到】
: 不是没BUG就能用的. 要考虑灵活性, 稳定性, PERFORMANCE, 还有对我来说最重要的,
: "不易出错性".
: 所谓不易出错性就是:
: 1. 程序员容易学 (这个不是你学会就行了, 你的TEAM也得学).
: 2. 程序员不易犯错误. 你自己试一下, 是不是一不小心就犯了错误了?然后骂自己不小
: 心? 其实不是你不小心, 因为这个工具设计的不合理.
: 就算你很小心从不犯错误, 但当你把这个工具推广给整个TEAM的时候, 别人可不会象你
: 那么小心了. 出了BUG到DEPLOY之后才发现就很惨. 然后你又不能骂你的DEVELOPER, 因
: 为那个确实很TRICKY啊. VB 那么流行就是这个原因. 因C太容易出错了.
: 综合以上所有条件我用LinQ2SQL, 然后是EF. 千万别用 Typed Dataset, 不知道哪个MS

avatar
r*o
32
agree. linq2sql就是自动生成Sql statement,少了维护stored proc的麻烦省事多了
另外sqlserver会cache sql statement的execure plan,performance和stored proc是
差不多的

【在 a****9 的大作中提到】
: 直接在code里用SQL statement有那么糟糕吗?我觉得当发生runtime erro 的时候,
: sql statement 比Linq 还容易排查呢

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。