Пример #1
0
        public void Insert(Activity entity, string tableName, int keyId)
        {
            try
            {
                using (var db = DbFactory.GetDataContext())
                {
                    var log = new ActivityLog
                        {
                            LogDate = entity.LogDate,
                            KeyId = keyId,
                            Activity = entity.ActivityName,
                            TableName = tableName,
                            User = entity.User
                        };

                    db.ActivityLogs.InsertOnSubmit(log);
                    db.SubmitChanges();
                }
            }
            catch (Exception ex)
            {
                LoggingUtility.LogException(ex);
            }
        }
Пример #2
0
 partial void UpdateActivityLog(ActivityLog instance);
Пример #3
0
 partial void DeleteActivityLog(ActivityLog instance);
Пример #4
0
 partial void InsertActivityLog(ActivityLog instance);