예제 #1
0
 public ActionResult Show(string db, string tb)
 {
     Table table = new Table();
     Row row = new Row();
     table.name = tb;
     table.collection = row.GetAll(db,tb);
     ViewData["collection"] = table;
     ViewBag.database = db;
     return View();
 }
예제 #2
0
 public ICollection<DataBase> List()
 {
     Table tb = new Table();
     ICollection<DataBase> coleccion= null;
     Connection c = new MysqlConecction();
     IDbConnection cnn = c.Open();
     try
     {
         var registro = SqlMapper.Query<DataBase>(cnn, "Server_GetDatabases", null, commandType: CommandType.StoredProcedure);
         coleccion = (ICollection<DataBase>)registro;
         foreach (var item in coleccion)
         {
             item.tables = tb.GetAll(item.name);
         }
     }
     catch (Exception e)
     {
     }
     finally
     {
         c.Close(cnn);
     }
     return coleccion;
 }