private questStatus delete(MasterPricingEntities dbContext, Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize questStatus status = null; try { // Read the record. Quest.Services.Dbio.MasterPricing.HTTPRequestLogs _httpRequestLog = null; status = read(dbContext, httpRequestLogId, out _httpRequestLog); if (!questStatusDef.IsSuccess(status)) { return(status); } // Delete the record. dbContext.HTTPRequestLogs.Remove(_httpRequestLog); dbContext.SaveChanges(); } catch (System.Exception ex) { return(new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}", this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.InnerException != null ? ex.InnerException.Message : ex.Message))); } return(new questStatus(Severity.Success)); }
public questStatus Delete(Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize questStatus status = null; // Delete httpRequestLog status = _dbHTTPRequestLogsMgr.Delete(httpRequestLogId); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }
public questStatus Delete(DbMgrTransaction trans, Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize questStatus status = null; // Perform delete in this transaction. status = delete((MasterPricingEntities)trans.DbContext, httpRequestLogId); if (!questStatusDef.IsSuccess(status)) { RollbackTransaction(trans); return(status); } return(new questStatus(Severity.Success)); }
public questStatus Read(Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId, out Quest.Functional.Logging.HTTPRequestLog httpRequestLog) { // Initialize httpRequestLog = null; questStatus status = null; // Read httpRequestLog status = _dbHTTPRequestLogsMgr.Read(httpRequestLogId, out httpRequestLog); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }
public questStatus Delete(Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize questStatus status = null; // Perform delete. using (MasterPricingEntities dbContext = new MasterPricingEntities()) { status = delete(dbContext, httpRequestLogId); if (!questStatusDef.IsSuccess(status)) { return(status); } } return(new questStatus(Severity.Success)); }
public questStatus Read(DbMgrTransaction trans, Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId, out Quest.Functional.Logging.HTTPRequestLog httpRequestLog) { // Initialize questStatus status = null; httpRequestLog = null; // Perform read. using (MasterPricingEntities dbContext = new MasterPricingEntities()) { Quest.Services.Dbio.MasterPricing.HTTPRequestLogs _httpRequestLog = null; status = read((MasterPricingEntities)trans.DbContext, httpRequestLogId, out _httpRequestLog); if (!questStatusDef.IsSuccess(status)) { return(status); } httpRequestLog = new Quest.Functional.Logging.HTTPRequestLog(); BufferMgr.TransferBuffer(_httpRequestLog, httpRequestLog); } return(new questStatus(Severity.Success)); }
private questStatus read(MasterPricingEntities dbContext, Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId, out Quest.Services.Dbio.MasterPricing.HTTPRequestLogs httpRequestLog) { // Initialize httpRequestLog = null; try { httpRequestLog = dbContext.HTTPRequestLogs.Where(r => r.Id == httpRequestLogId.Id).SingleOrDefault(); if (httpRequestLog == null) { return(new questStatus(Severity.Error, String.Format("ERROR: {0}.{1}: {2}", this.GetType().Name, MethodBase.GetCurrentMethod().Name, String.Format("Id {0} not found", httpRequestLogId.Id)))); } } catch (System.Exception ex) { return(new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}", this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.InnerException != null ? ex.InnerException.Message : ex.Message))); } return(new questStatus(Severity.Success)); }
public questStatus Create(DbMgrTransaction trans, Quest.Functional.Logging.HTTPRequestLog httpRequestLog, out Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize questStatus status = null; httpRequestLogId = null; // Data rules. // Create the httpRequestLog in this transaction. status = create((MasterPricingEntities)trans.DbContext, httpRequestLog, out httpRequestLogId); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }
/*================================================================================================================================== * Properties *=================================================================================================================================*/ #endregion #region Public Methods /*================================================================================================================================== * Public Methods *=================================================================================================================================*/ public questStatus Create(Quest.Functional.Logging.HTTPRequestLog httpRequestLog, out Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize questStatus status = null; httpRequestLogId = null; // Data rules. // Create the httpRequestLog using (MasterPricingEntities dbContext = new MasterPricingEntities()) { status = create(dbContext, httpRequestLog, out httpRequestLogId); if (!questStatusDef.IsSuccess(status)) { return(status); } } return(new questStatus(Severity.Success)); }
/*================================================================================================================================== * Properties *=================================================================================================================================*/ #endregion #region Public Methods /*================================================================================================================================== * Public Methods *=================================================================================================================================*/ public questStatus Create(Quest.Functional.Logging.HTTPRequestLog httpRequestLog, out Quest.Functional.Logging.HTTPRequestLogId httpRequestLogId) { // Initialize httpRequestLogId = null; questStatus status = null; // Date/time stamp it httpRequestLog.Created = DateTime.Now; // Create httpRequestLog status = _dbHTTPRequestLogsMgr.Create(httpRequestLog, out httpRequestLogId); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }