I am new at doing validation through the entity model and with dynamic controls but I have successfully added data annotation validations to my project. I was debugging it and it looks like there is always a call to the metadata class and the data
annotation attributes every time page is loaded (I have EnableDynamicData function in Page_Init as in tutorial)
Does this affect performance?
I was thinking it would only load the metadata and attributes set to be validated against, only when information is entered and perhaps a button clicked or a post back event happens. And not on the first call to the page.
Overall I have been told by the team and others that with any ORM you will have a perf hit of about 10% and it's not much different with DD. Since the Metamodel is cached any access to the metamodel with be a minimum perf hit.
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
KofiJ
0 Points
1 Post
Validation of meta data at every page load
Feb 03, 2012 03:25 PM|LINK
Hi,
I am new at doing validation through the entity model and with dynamic controls but I have successfully added data annotation validations to my project. I was debugging it and it looks like there is always a call to the metadata class and the data annotation attributes every time page is loaded (I have EnableDynamicData function in Page_Init as in tutorial)
Does this affect performance?
I was thinking it would only load the metadata and attributes set to be validated against, only when information is entered and perhaps a button clicked or a post back event happens. And not on the first call to the page.
Thanks
sjnaughton
All-Star
27308 Points
5458 Posts
MVP
Re: Validation of meta data at every page load
Feb 04, 2012 01:20 PM|LINK
Overall I have been told by the team and others that with any ORM you will have a perf hit of about 10% and it's not much different with DD. Since the Metamodel is cached any access to the metamodel with be a minimum perf hit.
Always seeking an elegant solution.