What is the best practice for customizing the latest change and who has changed the use of NHibernate?

In my application, I have a situation where we need to commit when the record was created and modified, and that the user performed these steps. So I might have something like:

public class Product
{ 
  int Id;
  int Name;
  DateTime CreatedOn;
  int CreatedByUserId;
  DateTime LastModifiedOn;
  int LastModifiedByUserId;
}

What is the best practice for data processing at NHibernate? Using an interceptor something like described here ?

+5
source share
2 answers

, , . . Diego (nHibernate) , . . , ASP.NET MVC, , HttpContext, ? , - , , .

, , . , , , nHibernate . , .

0

All Articles