Esempio n. 1
0
        public async Task <IActionResult> GetAllTable(string NomeDB)
        {
            await Db.Connection.OpenAsync();

            var query  = new AdminPostQuery(Db);
            var result = await query.AllTableAsync(NomeDB);

            return(new OkObjectResult(result));
        }
Esempio n. 2
0
        public async Task <IActionResult> GetAllDB()
        {
            await Db.Connection.OpenAsync();

            var query  = new AdminPostQuery(Db);
            var result = await query.AllDBAsync();

            return(new OkObjectResult(result));
        }
Esempio n. 3
0
        public async Task <IActionResult> PutOne(string NomeDB, string NomeTable, string NewNomeTable, [FromBody] AdminModel body)
        {
            await Db.Connection.OpenAsync();

            var query  = new AdminPostQuery(Db);
            var result = await query.FirstPostTableAsync(NomeDB, NomeTable, NewNomeTable);

            if (result is null)
            {
                return(new NotFoundResult());
            }
            return(new OkObjectResult(result));
        }