Here is the list of issues with this technology which I have learnt after extensively using it everywhere:
1. It cannot handle multiple threads. Basically it cannot even run 2 database queries at the same time!
2. Above pretty much means you cannot share the context object to use the caching.
3. You have to create multiple context objects everywhere. This is too heavy to use like this.
4. You have to go and set all the columns of the table to "Do not check" and primary key to "Always Check" if you want to use the context object properly.
Just in, I found another problem which made me write this post. If you use LINQ to SQL to interface with a stored procedure, then when you iterate through the result object, the data reader is actually open in the background. This is horrible!. I can't believe MS developers could have written code like this. If you don't know about this behavior and make other database calls before iterating through the result object, the data reader remains open and can cause a deadlock, and the database to get super slow!!!
Wow. Have to use entity framework now. Let us see how good that turns out to be..
No comments:
Post a Comment