Пример #1
0
        /// <summary>
        /// Adds record to log table
        /// </summary>
        /// <param name="record">Record object</param>
        /// <returns>Id of saved record</returns>
        public int AddLog(log record)
        {
            int log_id = 0;

            using (var ctx = new CrossoverDataContext())
            {
                using (var scope = new TransactionScope(TransactionScopeOption.Required,
                                                        new TransactionOptions {
                    IsolationLevel = IsolationLevel.Serializable
                }))
                {
                    ctx.logs.InsertOnSubmit(record);
                    ctx.SubmitChanges();
                    log_id = record.log_id;
                    scope.Complete();
                }
            }
            return(log_id);
        }
Пример #2
0
 partial void Deletelog(log instance);
Пример #3
0
 partial void Updatelog(log instance);
Пример #4
0
 partial void Insertlog(log instance);
Пример #5
0
 private void detach_logs(log entity)
 {
     this.SendPropertyChanging();
     entity.application = null;
 }
Пример #6
0
 private void attach_logs(log entity)
 {
     this.SendPropertyChanging();
     entity.application = this;
 }