public int Register(UserActivityLogEntry entry)
 {
     var result = ApplicationDbContext.DbAction(db =>
     {
         db.UserActivityLog.Add(entry);
         return db.SaveChanges();
     });
     return result;
 }
 private static object CreateActivityViewRows(UserActivityLogEntry entry, ApplicationUser user)
 {
     return new [] 
     {
         user.Id,
         entry.TimeStamp.ToString("yyyy-MM-dd hh:mm"),
         user.UserName,
         entry.ActivityKind.Caption(),
         entry.ObjectKind.Caption()
     };
 }