Linq To SQL - My Thoughts
-
Hi, I apologize if this is the wrong forum. But I code in C# and it does technically involve programming discussion, hehe. Feel free to move it if necessary. :) Anyhow, I recently dove into Linq To SQL. I absolutely love it. I had "studied" it a bit for quite some time before making the move. I wanted to understand it the best I could prior to dealing with it. And then I wrote an application a few days ago that uses Linq To SQL. It makes everything SO much easier. I just designed the required database in SQL Server 2008 Express. Then I did "Add New Item..." -> "Linq To SQL Classes". From there, it was as simple as writing the queries and manipulating the data the way I needed to. :) Could someone please provide some (or a link to) the major advantages/disadvantages on the subject? I'm sure there are plenty of each. I would like to know when it would not really be beneficial (if ever). :) Thanks! Rock on, Linq To SQL! :)
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
-
Hi, I apologize if this is the wrong forum. But I code in C# and it does technically involve programming discussion, hehe. Feel free to move it if necessary. :) Anyhow, I recently dove into Linq To SQL. I absolutely love it. I had "studied" it a bit for quite some time before making the move. I wanted to understand it the best I could prior to dealing with it. And then I wrote an application a few days ago that uses Linq To SQL. It makes everything SO much easier. I just designed the required database in SQL Server 2008 Express. Then I did "Add New Item..." -> "Linq To SQL Classes". From there, it was as simple as writing the queries and manipulating the data the way I needed to. :) Could someone please provide some (or a link to) the major advantages/disadvantages on the subject? I'm sure there are plenty of each. I would like to know when it would not really be beneficial (if ever). :) Thanks! Rock on, Linq To SQL! :)
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
Waaay too late to the party, my friend :)... 1) Anything Linq related is going to be slower... 2) Linq2Sql is dead... I don't believe MSFT is developing it any further, they are focusing on Entity Framework. Plenty of ORM frameworks to choose from. Linq2Sql is NOT a good pick. EF, nHibernate, etc. are better choices.
-
Hi, I apologize if this is the wrong forum. But I code in C# and it does technically involve programming discussion, hehe. Feel free to move it if necessary. :) Anyhow, I recently dove into Linq To SQL. I absolutely love it. I had "studied" it a bit for quite some time before making the move. I wanted to understand it the best I could prior to dealing with it. And then I wrote an application a few days ago that uses Linq To SQL. It makes everything SO much easier. I just designed the required database in SQL Server 2008 Express. Then I did "Add New Item..." -> "Linq To SQL Classes". From there, it was as simple as writing the queries and manipulating the data the way I needed to. :) Could someone please provide some (or a link to) the major advantages/disadvantages on the subject? I'm sure there are plenty of each. I would like to know when it would not really be beneficial (if ever). :) Thanks! Rock on, Linq To SQL! :)
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
It's all rubbish. Roll your own so you know what it's doing.
-
It's all rubbish. Roll your own so you know what it's doing.
-
Hi, I apologize if this is the wrong forum. But I code in C# and it does technically involve programming discussion, hehe. Feel free to move it if necessary. :) Anyhow, I recently dove into Linq To SQL. I absolutely love it. I had "studied" it a bit for quite some time before making the move. I wanted to understand it the best I could prior to dealing with it. And then I wrote an application a few days ago that uses Linq To SQL. It makes everything SO much easier. I just designed the required database in SQL Server 2008 Express. Then I did "Add New Item..." -> "Linq To SQL Classes". From there, it was as simple as writing the queries and manipulating the data the way I needed to. :) Could someone please provide some (or a link to) the major advantages/disadvantages on the subject? I'm sure there are plenty of each. I would like to know when it would not really be beneficial (if ever). :) Thanks! Rock on, Linq To SQL! :)
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
Although Entity Framework has replaced Linq2Sql in Microsoft's technology stack, the philosophy behind the APIs remains the same. Whatever you've learned about Linq2Sql will help you in EF. My observation is that ORMs are a lot more flexible on the data query side than on the data manipulation side. I tried Hibernate/nHibernate, Linq2Sql and EF, and in all cases the data retrieval was impeccable. Writing data back, however, was a different story: all frameworks are great when you modify your data in memory and then write it back, but you must jump through the hoops to implement mass inserts (e.g. table-to-table copies), updates, or deletes. Here is a good link that explains the issue and provides a work-around for Linq2Sql[^]. Good luck!
-
Hi, I apologize if this is the wrong forum. But I code in C# and it does technically involve programming discussion, hehe. Feel free to move it if necessary. :) Anyhow, I recently dove into Linq To SQL. I absolutely love it. I had "studied" it a bit for quite some time before making the move. I wanted to understand it the best I could prior to dealing with it. And then I wrote an application a few days ago that uses Linq To SQL. It makes everything SO much easier. I just designed the required database in SQL Server 2008 Express. Then I did "Add New Item..." -> "Linq To SQL Classes". From there, it was as simple as writing the queries and manipulating the data the way I needed to. :) Could someone please provide some (or a link to) the major advantages/disadvantages on the subject? I'm sure there are plenty of each. I would like to know when it would not really be beneficial (if ever). :) Thanks! Rock on, Linq To SQL! :)
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
LINQ to SQL isn't "dead" dead, it is still being supported (and looks likely to remain so for a while) but no new features are being added. Microsoft is focusing on the Enitiy Framework, so that is worth a squizz and having used LINQ to SQL will help you It is worth looking at the ADO stuff directly, but only so: a) You understand the underlying technologies b) You realise exactly how much the various LINQ database stuff is giving you. Straight ADO was an (u)necessary pain. It is needed to get the data in and out (and therefore necessary). But then you had to work with the results sets, and they didn't play well in OO land.[^] so you had to write your own ORM or live with the fact you were working with relation data and forego a proper object model, without built-in support this was un unecessary pain.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
Waaay too late to the party, my friend :)... 1) Anything Linq related is going to be slower... 2) Linq2Sql is dead... I don't believe MSFT is developing it any further, they are focusing on Entity Framework. Plenty of ORM frameworks to choose from. Linq2Sql is NOT a good pick. EF, nHibernate, etc. are better choices.
Linq2Sql is dead indeed, but it has been completed. Theres nothing to be done more. So I cannot consider this as a disadvantage. EF is much more complex and difficult to use. It also has lots of bugs. Linq2Sql is a perfect choice for smaller applications. What about larger apps? EF is also quite slow. In some scenarios ADO.NET could just be better choice. NHibernate? It almost doesnt have any sensible documentation, tutorials, showhows. It is the worst possible choice in my opinion.