public IEnumerable <AboutUs> Get() { List <AboutUs> aboutus = new List <AboutUs>(); try { var aboutusservice = new AboutUsService(); aboutus = (List <AboutUs>)aboutusservice.GetAboutUs(); } catch { } return(aboutus); }
public HttpResponseMessage GetAboutUs1() { List <AboutUs> aboutus = new List <AboutUs>(); try { var aboutusservice = new AboutUsService(); aboutus = (List <AboutUs>)aboutusservice.GetAboutUs(); } catch { } return(Request.CreateResponse(HttpStatusCode.OK, aboutus)); //return ToJson(aboutus); //JavaScriptSerializer json = new JavaScriptSerializer(); //string output = json.Serialize(aboutus); //return output; }