Example #1
0
        public HttpResponseMessage getLastBookID()
        {
            List <BookDetails> list = new List <BookDetails>();
            BookDetails        u    = new BookDetails();

            list = u.getLastBookID();
            string yourJson = JsonConvert.SerializeObject(list);;
            var    response = this.Request.CreateResponse(HttpStatusCode.OK);

            response.Content = new StringContent(yourJson, Encoding.UTF8, "application/json");
            return(response);
        }