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)); } }