4

What are the pro's and con's of using "Linq to SQL" and core ADO.NET technology for access databases?

Draško
  • 2,119
  • 4
  • 41
  • 73

4 Answers4

1

Advantage

  • No need to create business objects dbml files will do for you
  • No need to worry about writing queries because linq2sql convert your statment in efficient queries
  • Important is Lazy Loading of related objects

Disadvantage

Community
  • 1
  • 1
Pranay Rana
  • 175,020
  • 35
  • 237
  • 263
0

I have the same view point as this post, I've yet to find any major disadvantages of Linq.

I have built a number or application and websites using Linq and found it to be extremlly simple to use

http://forums.asp.net/t/1520157.aspx comment by BoogleC

Regards Sp

Steven
  • 2,148
  • 8
  • 33
  • 50
0

Id also be carefull about how you write you LINQ statement. Sometimes its better to compile your Linq rather than not as every single run of the Linq query is fully parsed every time it happens. See below linq

http://www.codinghorror.com/blog/2010/03/compiled-or-bust.html

CSI86
  • 1
  • 1
-1

I wouldn't recommend LINQ to SQL at all as it is effectively dead (you don't want to be writing legacy code, right?). Microsoft is no longer developing it and they recommend using the Entity Framework instead (see here), however, if you are interested in using an ORM, I would strongly recommend looking at NHibernate.

Graham
  • 14,885
  • 4
  • 36
  • 42
  • There are reasons why you may choose one over the other described here http://msdn.microsoft.com/en-us/library/cc161164.aspx – Peter Willis May 31 '10 at 11:19