c# - Getting the username inside a model class -


I am trying to implement original auditing with some of my models (as created, updated, Created and updated).

The date / time is divided when a property changes (implementing the INotifyPropertyChanging, INotifyPropertyChanged ) and corrects the reporter areas, then I I'm throwing.

I just need to know how to get the current user name every time I get an instant installation of the institute or model, without passing it through the controller.

I did not know about it.

Thank you. I do it like this:

  membership. GetUser () Username  

How fast is that?


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -