I have ViewModel which inherits from IValidatableObject. In this model I have to make custom validation and it's require Session variables and User.Identity. I could not find appropriate way how to access this variables. I thought something about static class where would be getter properties, but I am not sure it's valid way.
Asked
Active
Viewed 476 times
1 Answers
1
I think I found answer.
HttpContext.Current.User.Identity

Yara
- 4,441
- 6
- 42
- 62
-
1What if I want to pass certain data to the method Validate.? how do you do it? – hmota Sep 11 '18 at 19:33