public async Task <IActionResult> CoinToss(string query, string coinquery, string sqlquery) { if (string.IsNullOrEmpty(query)) { return(View(null)); } var coin = new CoinTranslate(query); //string json = await GetAnyGridFromSqlQuery(query); string json = await GetAnyGridFromSqlQuery(coin.Translate()); ViewData["json"] = json; ViewData["SqlExamples"] = ex.Sql; ViewData["CoinExamples"] = ex.Coin; ViewData["CoinQuery"] = coinquery; ViewData["SqlQuery"] = sqlquery; return(View()); }
public async Task <IActionResult> CoinSelect(string SingerSelection) { if (string.IsNullOrEmpty(SingerSelection)) { return(View(null)); } var coinQuery = string.Format("extract Singer, Title from singers using (S/\"{0}\")", SingerSelection); //string InjectionAttack = "extract UserName, PasswordHash from users using (S/\"admin\") and (S/\"pass\") where "; //string sqlAttack = "select username, passwordHash, from users where username = '******' and (pass = 0) = 0"; var coin = new CoinTranslate(coinQuery); var sqlQuery = coin.Translate(); var CoIn_Interface_View = await Create_CoinInterfaceView(sqlQuery); ViewData["json"] = ConvertAnyModelToJson(CoIn_Interface_View); var singers = await GetListFromSqlQuery("select singer from " + DbHelper.Name() + ".singers"); return(View(singers)); }
public string Get() { var coin = new CoinTranslate(COIN_TEST_QUERY_1); return(coin.Translate()); }