|
提示: 作者被禁止或删除, 无法发言
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册
x
http://www.linqpad.net/
这个工具的确帮助我学习了LINQ,而且用它来调试linq也很方便。学习LINQ的好工具,可惜原来的版本不支持想VS里面字段名和类名的映射,这样这里写好的LINQ语句,还要手工调整每个字段名称,才能copy回VS。不过除非VS集成linqpad,或者linqpad以VS插件的形式出现,否者这个功能是不好实现了。我原来用的是0.99版本,这次升级了新版,一定更加强大了。
Tired of querying in antiquated SQL?
Well, you don't have to! LINQPad lets you interactively query SQL databases in a modern query language: LINQ. Kiss goodbye to SQL Management Studio!
LINQPad supports everything in C# 3.0 and Framework 3.5:
- LINQ to SQL
- LINQ to Objects
- LINQ to XML
LINQPad is also a great way to learn LINQ: it comes preloaded with 200 examples from my book, C# 3.0 in a Nutshell. There's no better way to experience the coolness of LINQ and functional programming.
And LINQPad is more than just a LINQ query tool: it's a code snippet IDE. Instantly execute any C# 3 or VB 9 expression or statement block!
Best of all, LINQPad is free and needs no installation: just download and run. The executable is only 2MB and is self-updating.
The LINQPad Challenge
If you think that you understand LINQ—or would like to—then I invite you to take the LINQPad Challenge.
The rules are simple:
Locate the shortcut for SQL Management Studio on your Start Menu and move it some place else.
In its place, insert a shortcut to LINQPad.
For the next week, perform all your ad-hoc SQL queries using only LINQPad.
At the end of the week, you will actually think in LINQ, rather than thinking in SQL and translating to LINQ.
LINQPad also allows old-fashioned SQL queries for tasks are genuinely impossible or clumsy in LINQ. You'll feel an unpleasant sense of failure, though, should you cheat and use this feature frivolously!
If you can write all your ad-hoc queries in LINQ, you have a big head-start in C# 3.0 and LINQ. And continued use of LINQPad will keep your LINQ knowledge alive—if you're not lucky enough to be using LINQ in your current projects.
|
|