Пример #1
0
 public JsonResult Post(string table, [FromBody] JObject parameters)
 {
     try
     {
         MarketContext MC = new MarketContext();
         MC.CreateConnection();
         if (MC.Connected())
         {
             return(Json(MC.Insert(table, parameters)));
         }
         else
         {
             throw new Exception("Connection failed");
         }
     }
     catch (Exception ex)
     {
         return(Json("Error: " + ex.Message));
     }
 }