public string GetByModel(string strQuery) //fail { TB_CHARGING oData = Newtonsoft.Json.JsonConvert.DeserializeObject <TB_CHARGING>(strQuery); //先前台序列化,再在后台 反序列 的方式 return("ChargingData" + oData.ID); }
public string GetAllChargingData2([FromUri] TB_CHARGING obj) { throw new NotImplementedException("方法不被支持"); }
public string GetAllChargingData([FromUri] TB_CHARGING obj)//success //ajax那边传的是string 要用[FromUri] 才能接收,否则为NULL { return("ChargingData" + obj.ID); }