5

Is it possible to load attributes values from config file? For example I have attribute below which cache property return value. This attribute used more than 10 times in application and I would like to load second attribute parameter(1800 seconds) from config file.

[Cache(CacheType.Absolute, 1800, CacheLocation.Memory)]
Tomas
  • 17,551
  • 43
  • 152
  • 257

1 Answers1

-1

I thinks You can do this by writing your Attributes like this:

How to create Custom Data Annotation Validators

Community
  • 1
  • 1
Arian
  • 12,793
  • 66
  • 176
  • 300