Yara
Yara

Reputation: 4565

How to access User.Identity from Validate method of IValidatableObject?

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.

Upvotes: 1

Views: 515

Answers (1)

Yara
Yara

Reputation: 4565

I think I found answer.

HttpContext.Current.User.Identity

Upvotes: 1

Related Questions