static async System.Threading.Tasks.Task Main(string[] args) { Console.WriteLine("Hello World!"); String dbName = "geo_ve_check"; DbTransactions.checkDbRawQuery(); //API(nodes); //Console.WriteLine("Total ways : " + ways[0].Tags[0]); //Console.WriteLine("Total Nodes: " + nodes.Count); //Console.WriteLine("Total Ways: " + ways.Count); }
protected override DbConnection OnGetConnectionWithTransaction(Transaction ts) { ReferenceConnection refConnection = GetRefConnectionWithoutTx(this.Name); DbConnection connection = refConnection.Connection; if (connection.State == ConnectionState.Closed) { connection.Open(); } DbTransactions localTxs = null; lock (GraphWithTx) { if (GraphWithTx.TryGetValue(ts, out localTxs) == false) { localTxs = new DbTransactions(); GraphWithTx.Add(ts, localTxs); } } DbTransaction localTx = null; lock (localTxs) { if (localTxs.TryGetValue(refConnection, out localTx) == false) { localTx = connection.BeginTransaction(); localTxs.Add(refConnection, localTx); } } this.LocalTransaction = localTx; return(connection); }