views:

31

answers:

1

Hi,

I'm running profiler tools on the LINQ-to-SQL data access layer.

A lot of the time is spent on GetTable<clsName>() because it's being called each time i CRUD data.

Is it possible to cache GetTable<clsName>() for all the tables when the application starts or serve it through some sort of repository where it will be in memory?

Thank you

Edit: Alternatively, is there a way to avoid using GetTable<> ?

+1  A: 

I don't think it's possible to avoid getting it, but caching it seems like to should be reasonable.

This seems like something that should be put to the "Engineer's Test" ("Make sure it's not between you & the door, and plug it it!")

James Curran
I guess I could use the stored procedures instead,will need to run few tests.
vikp