Example #1
0
        public IEnumerable <HowToInvolve> Get()
        {
            List <HowToInvolve> howtoinvolve = new List <HowToInvolve>();

            try
            {
                var howtoinvolveservice = new HowToInvolveService();
                howtoinvolve = (List <HowToInvolve>)howtoinvolveservice.GetHowToInvolve();
            }
            catch
            {
            }

            return(howtoinvolve);
        }
Example #2
0
        public HttpResponseMessage GetHowToInvolve1()
        {
            List <HowToInvolve> howtoinvolve = new List <HowToInvolve>();

            try
            {
                var howtoinvolveservice = new HowToInvolveService();
                howtoinvolve = (List <HowToInvolve>)howtoinvolveservice.GetHowToInvolve();
            }
            catch
            {
            }

            return(Request.CreateResponse(HttpStatusCode.OK, howtoinvolve));

            //return ToJson(howtoinvolve);

            //JavaScriptSerializer json = new JavaScriptSerializer();
            //string output = json.Serialize(howtoinvolve);

            //return output;
        }