/// <summary> /// Execute the insert and return the inserted identity value /// </summary> /// <param name="adp"></param> /// <returns></returns> public object ExecuteReturnID(IDBExecutor adp) { bool prevValue = ReturnID; ReturnID = true; SQSelectResult res = null; try { res = adp.Insert(this); if (res.Reader.Read()) { return(res.Reader.GetValue(0)); } } finally { ReturnID = prevValue; if (res != null) { res.Close(); } } return(null); }
public void Execute(IDBExecutor dbe) { dbe.Insert(this); }
/// <summary> /// Execute the insert /// </summary> /// <param name="adp"></param> public void Execute(IDBExecutor adp) { adp.Insert(this).Close(); }