Everybody has to admit that Linq is wonderful and has lots of potential , and that is one fact.
The other fact is that when you start use Linq you will see that a lot of features are missing and you would love to have them.
For instance, Imagine that you want to do this "Delete from table where id > 10".
Try do this using linq, and don't implement nothing else. The answer is simple
var x = from t in table
where t.Id > 10
select t;
and know you have to do a foreach in every element that exist in variable X and then call deleteOnSubmit on Entity table, and after de foreach you have to call the submitChanges.
Seems simple, now try use the sql server profile and seed what was generated
select ... from table where id > 10
delete from table where id = 11 ...
delete from table where id = 12 ...
...
Simple hummm, did you see how many queries was executed just to do a simple Delete from table where id > 10
Know imagine another scenario...
You have a web form and in that web form you have search fields, lets imagine that you have 2 fields one "Name" and other "Date"
Now lets imagine that you what to do this
select * from Table where Name like '%XXX%' - when only the field Name is not empty and field Date is empty
select * from Table where Date > 'YYY' - when only the field Date is not empty and field Name is empty
select * from Table where Name like '%XXX%' and Date > 'YYY' - when only the field Name is not empty and field Date is not empty
and
select * from Table - if both fields are empty
how can you do this using only what came out of the box with Linq
The answer is simple I will have a bunch of queries, one for each situation, the problem will be if I have more that 2 fields.
Microsoft give developer a file called DynamicQuery.cs that came with Linq samples. This file enable me to do this
var query = from t in Table;
query.Where("Date > \"YYY\").Select(t => t);
Nice Now I just have to create a string and have just only one query. But when you did this you have just kill part of the essence of linq (benefits of IntelliSense and compile-time error checking). That string will only be evaluated in runtime. If i'm using linq like that what's the point of using linq???
And these kind of problem occur also in order by for instance. Imagine that you have your own table and when you click on the header of a column you what to order that column. How can you do know what query you execute in complie time, the answer is you can't.
Another problem I've just realize recently when I answer a post in linq forum in MSDN is how can I undo all the things I've just done in my DataContext.
Let's imagine that I have a DataContext and I have just do a series of changes in my entities. How can I undo changes made in DataContext.
The answer is, you can't. But you can create a new DataContext and start everything from the beginning, nice :(
this is just a couple of "miss features" that are missing in linq and the list of "miss features" is not small :)
My opinion is that linq is great and should be used despite this small problems, and there are solutions out there really nice solutions to solve some of these "missing feature".
The other thing you should keep in mind is that working with linq is not easy, and you learn a lot every day :)