0

Building an application with a database that has the ability to get big not HUGE 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.

3
  • Is the back end sql server? I like to do most of my business logic on the sql server end whenever possible through the use of sprocs and views.
    – buckbova
    Jun 22, 2010 at 19:18
  • @buckbova I assume you don't test any of that logic then :-) Jun 22, 2010 at 19:24
  • Yes I do use SQL Server in the back end
    – Rico
    Jun 22, 2010 at 19:26

4 Answers 4

4

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

5
  • I have heard Entity framework has too much overhead as far as optimizing sql it has real problems. whats the benefit? Can you offer more guidance in the statement Why. Whats Entity have thats great and makes it faster and easier? We are looking at sometimes returning 100k records to the front end.
    – Rico
    Jun 22, 2010 at 19:19
  • Entity Framework matured a good bit in 4. With your data exposed as OData Services (via WCF Data Services), querying your underlying data from Silverlight is a snap. Jun 22, 2010 at 19:21
  • do you have a good Link to A EF tutorial or primer. I know nothing about it. So any thoughts i have are someone elses. Educate me my man
    – Rico
    Jun 22, 2010 at 19:23
  • @Rico - I just added another link with a walkthrough for setting everything up. You should also poke around the WCF Data Services site for more thorough examples. Jun 22, 2010 at 19:27
  • WCF is already the form of data transfer i have chosen. I have heard mixed thoughts on EF and i should definately educate myself. I appreciate the link.
    – Rico
    Jun 22, 2010 at 19:29
3

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.

1
  • Hey this is a really good comment well put together and shows me a lot. I appreciate you taking the time to define this for me
    – Rico
    Jun 29, 2010 at 21:45
0

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.

2
  • so are you saying Linq over EF? Or are you stating that there is nothing wrong with LINQ for Big DBs and huge data sends?
    – Rico
    Jun 22, 2010 at 19:27
  • No. LINQ actually works really nicely with EF, but works well with LINQ-to-SQL too. That tech choice is a matter of preference. I'm just saying that many people think the performance of LINQ will be poor because it kinda looks like just another middleware product, or hibernate knock-off, but it is waaay more than that. I was skeptical till I saw a SQL trace of what was happening under the hood, and realized that LINQ translated straight-through to the DB query level. The underlying queries were tight and would yield performance equivalent to straight SQL calls.
    – tgolisch
    Jun 22, 2010 at 19:51
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.