// GET: api/Country/ public dynamic Get(string code) { try { return(FireRiskMdl.get_risk(code)); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }
public object Check(string code) { try { var result = FireRiskMdl.get_risk(code); return(result != null ? (object)new { state = true, name = result.FRK_NAME } : new { state = false }); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }