/// <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); }
partial void Deletelog(log instance);
partial void Updatelog(log instance);
partial void Insertlog(log instance);
private void detach_logs(log entity) { this.SendPropertyChanging(); entity.application = null; }
private void attach_logs(log entity) { this.SendPropertyChanging(); entity.application = this; }