예제 #1
0
 public JsonResult Get(string table, string filter)
 {
     try
     {
         MarketContext MC = new MarketContext();
         MC.CreateConnection();
         if (MC.Connected())
         {
             return(Json(MC.Select(table, filter)));
         }
         else
         {
             throw new Exception("Connection failed");
         }
     }
     catch (Exception ex)
     {
         return(Json("Error: " + ex.Message));
     }
 }