I'm trying to implement basic auditing with some of my models (like CreatedAt, UpdatedAt, CreatedBy and UpdatedBy).
The date/time part is done. I'm throwing events on my models when a property is changed (implementing INotifyPropertyChanging, INotifyPropertyChanged
) and can update the correspondent fields just fine.
I just need to know how to get the current user name without having to pass it through the controller every time I instantiate or get an existing instance of a model.