public HttpResponseMessage ViewAllDevice(int agency_id) { var result = _agencyDomain.ViewAllDeviceByAgencyId(agency_id); return(Request.CreateResponse(HttpStatusCode.OK, result)); }
public ActionResult GetAllDevice(int agency_id) { var result = _agencyDomain.ViewAllDeviceByAgencyId(agency_id); return(Json(new { result }, JsonRequestBehavior.AllowGet)); }