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
  • 16,554
  • 40
  • 146
  • 240

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,795
  • 60
  • 169
  • 277