Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to ignore data annotation attributes #4492

Open
rockfordlhotka opened this issue Feb 16, 2025 · 1 comment
Open

Add option to ignore data annotation attributes #4492

rockfordlhotka opened this issue Feb 16, 2025 · 1 comment

Comments

@rockfordlhotka
Copy link
Member

There is some overhead to scanning business types during app startup in order to find and register the data annotation attributes as CSLA rules.

Normally this is incidental, but in a serverless scenario (for example) where app startup happens every time any code is used, this overhead can become problematic.

We can add an option to the AddCsla method to tell CSLA to not scan types for data annotation attributes. Normal rule registration would still occur, but without this scan, data annotation attributes would be ignored by CSLA.

@StefanOssendorf
Copy link
Contributor

I can think of two ways:

  • global setting to disable it for all objects
  • add a flag to BusinessRules to make it a case per case setting. Important is to call base after changing the flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants