开发者

LINQ-To-SQL - Is it possible to cache GetTable or serve it from repository?

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!")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜