开发者

Linq or ADO or?

开发者 https://www.devze.com 2023-01-04 21:14 出处:网络
Building an application with a database that has the ability to get big not H开发者_开发技巧UGE but definate big tables with a million records +.I just saw somewhere that LINQ isn\'t good for Big Datb

Building an application with a database that has the ability to get big not H开发者_开发技巧UGE but definate big tables with a million records +. I just saw somewhere that LINQ isn't good for Big Datbases.

Front end will be in Silverlight and I was really looking forward to using its Skip and Take functionality for the Asynchronous calls to speed up the Clients first access to my GUI.

What can you tell me would be wrong with this scenario?

Woudl you use LINQ or something else?

MY BAck End is SQL Server 2005 or better.


I would use WCF Data Services (to serve the data from the server to the Silverlight application) with Entity Framework 4 backing those services.

You might also want to check out this article from the MSDN magazine that walks you through creating a simple Entity Data Model (from the ground up), WCF Data Services on top of your model, and then how to consume those services from Silverlight:

Visual Studio - Entity Framework 4.0 and WCF Data Services 4.0 in Visual Studio 2010


I agree with Justin's answer and am only submitting my own answer because no one appears to have answered the question you posed in one of your comments.
  "Whats Entity have thats great and makes it faster and easier?"

* LINQ used in conjunction with Entity Framework provides a very clean syntax that after some learning curve is easier to write.
* IMO it is easier to read from nearly the beginning.
* You get Intellisense.
* You do not have the mess of SQL embedded in C# or VB.
* You get a nice document.

Bottom line is you more get better (easier to maintain) C# code.

I should also add that these same benefits can be gained from using NHibernate and other ORM tools. Entity Framework is not your only choice.


LINQ actually converts your LINQ code syntax into SQL commands (under the hood). If you have any doubts about this, you can use the SQL Profiler (also known as SQL Trace) to see the SQL commands that are generated by LINQ behind the scenes. Performance-wise, it should be similar to ADO.NET.


I agree with Justin you should definitely use Entities, but you should be using LINQ on the entities in the form of cached queries to Lists.

IdeaBlade's DevForce may offer a more comprehensive solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号