I'm a little bit confused about these two terms "Linq to SQL" and "Entity Framework". I have the general idea that both of them somehow allow you to refer to database tables as .net objects or something of the sort, but please explain to me the difference between these two terms.
This subject has already been covered several times, you may be interested in reading:
- https://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql. The top answer is short and right on the spot although a little bit dated (2008)
- https://stackoverflow.com/questions/3293995/what-is-the-difference-between-entity-framework-and-linq-to-sql-by-net-4-0. More specifically related to the 4.0 version of the framework.
- http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/dc83097e-9c70-4970-93e2-dbc8636eb321 (I took this link from the answer provided by @jlnorsworthy in Should I be learning Linq, Direct SQL Commands (in .net), EF or other?)
They are similar in that they both are ORM-based but EF is more "enterprisey" and feature-complete than Linq. EF is more comparable to NHibernate as for the available features and has matured with the release of .NET 4.0. Also, one of the most important things to keep in mind is that Linq will lead you into trouble if your DBMS is not part of the SQL Server family (be it "Express" or "Compact").
Edit: as @jkohlhepp has stated in the comment below, Linq to SQL is in maintenance mode (not Linq! thanks to Randy), so no more new features only bug corrections will be done. As such, it really is recommended to start new projects with EF.