Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 partial void Deletelog(log instance);
Ejemplo n.º 3
0
 partial void Updatelog(log instance);
Ejemplo n.º 4
0
 partial void Insertlog(log instance);
Ejemplo n.º 5
0
 private void detach_logs(log entity)
 {
     this.SendPropertyChanging();
     entity.application = null;
 }
Ejemplo n.º 6
0
 private void attach_logs(log entity)
 {
     this.SendPropertyChanging();
     entity.application = this;
 }