Esempio n. 1
0
        private void WriteActivityLog(string activityText, ActivityLogType activityType, string targetId, TargetObjectType targetType)
        {
            var logData = new ActivityLog
            {
                UserId       = User.Identity.GetUserId(),
                ActivityText = activityText,
                ActivityType = activityType.ToString(),
                TargetId     = targetId,
                TargetType   = targetType.ToString(),
                IPAddress    = Request.UserHostAddress
            };

            _activityStore.WriteActivityLog(logData);
        }
        public Task InsertActivity(ActivityLogType activityLogType,
                                   string comment, User user)
        {
            var newActivity = new ActivityLog()
            {
                ActivityLogType = activityLogType,
                Comment         = Helper.CommonHelper.ConvertEnum(activityLogType.ToString()) + "( " + comment + " )",
                //UserId = user.Id,
                CreatedOnUtc = DateTime.Now
            };

            _activityLogrepository.Insert(newActivity);
            //return _unitOfWorkAsync.SaveChangesAsync();
            return(null);
        }