I just started playing with Linq to SQL the other day and was curious if I should use it in up coming projects. I know it will save me tons of developement time. I have seen many similar questions out there on the subject but I have a few more specific questions.
- Is there anything wrong with inheriting the classes generated in the .dbml file?
- Are the generated SQL commands efficient? When I used SQL Server Profiler I noticed when I would get a list of all records using a linqDataSource to bind to a gridView I would see two querries being executed. The first one was a SELECT COUNT(*) and then a SELECT TOP(PageSizeOfGrid). Why?
- Would I be better off using an ObjectDataSource getting all records from a stored procedure and caching them?
- Entity Framework? Don't know much about it but I think it may be too heavy for my needs. Most of my databases are fairly simple 10 - 20 tables that may have many to many relationships. Is it worth looking into?
Any ideas on any of this are appreciated. Thanks!