public void GetAllUsers(HttpContext context) { List <Student> students = StudentBal.GetUsers(); var js = new JavaScriptSerializer(); context.Response.Write(js.Serialize(students)); }
// GET api/values public List <Student> Get() { List <Student> students = StudentBal.GetUsers(); return(students); }