This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"description": "Amazon CloudWatch Agent JSON Schema", | |
"properties": { | |
"agent": { | |
"$ref": "#/definitions/agentDefinition" | |
}, | |
"metrics": { | |
"$ref": "#/definitions/metricsDefinition" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DataTable SapDataTableToDotNetDataTable(string pathToXmlFile) | |
{ | |
var DT = new DataTable(); | |
var XMLstream = new System.IO.FileStream(pathToXmlFile, FileMode.Open); | |
var XDoc = System.Xml.Linq.XDocument.Load(XMLstream); | |
var Columns = XDoc.Element("DataTable").Element("Columns").Elements("Column"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF (OBJECT_ID('Count_Test_View') IS NOT NULL) | |
DROP VIEW Count_Test_View | |
IF (OBJECT_ID('Count_Test') IS NOT NULL) | |
DROP TABLE Count_Test | |
CREATE TABLE Count_Test | |
( | |
Id int Identity(1,1) PRIMARY KEY NOT NULL, | |
value int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static List<T> Query<T>(this DataContext db, string sql, object param = null, int? commandTimeout = null, IDbTransaction transaction = null, [CallerFilePath]string fromFile = null, [CallerLineNumber]int onLine = 0, string comment = null) | |
{ | |
using (db.Connection.EnsureOpen()) | |
{ | |
try | |
{ | |
return db.Connection.Query<T>(MarkSqlString(sql, fromFile, onLine, comment), param, transaction ?? db.Transaction, true, commandTimeout).AsDapperList(); | |
} | |
catch (SqlException ex) when (ex.Is(SqlErrorCode.DatabaseReadOnly_3906)) | |
{ |