public TransactionStatus SaveException(ApplicationErrorLogBo appErrorLogBo) { var transactionStatus = new TransactionStatus(); var appErrorLog = BuiltApplicationErrorLogDomain(appErrorLogBo); CemexDb con = new CemexDb(); SqlConnection conn = con.GetConnection(); conn.Open(); SqlCommand cmd = new SqlCommand("dbo.proc_AddApplicationErrors", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@error", appErrorLog.Error); cmd.Parameters.AddWithValue("@stackTrace", appErrorLog.Stacktrace); cmd.Parameters.AddWithValue("@innerException", appErrorLog.InnerException); cmd.Parameters.AddWithValue("@source", appErrorLog.Source); cmd.ExecuteNonQuery(); return(transactionStatus); }
private ApplicationErrorLog BuiltApplicationErrorLogDomain(ApplicationErrorLogBo appErrorLogBo) { return((ApplicationErrorLog) new ApplicationErrorLog().InjectFrom(appErrorLogBo)); }