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 GetT开发者_开发知识库able<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<> ?
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!")
精彩评论