コード例 #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
ファイル: DataBase.cs プロジェクト: nandyx/ManageMyServer
 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;
 }