示例#1
0
        public HttpResponseMessage Get()
        {
            ReadDataContext rdc = new ReadDataContext("readStore");

            var tv = rdc.Query <Television>().ToList();

            return(Request.CreateResponse(HttpStatusCode.OK, tv));
        }
示例#2
0
        public HttpResponseMessage Get(Guid id)
        {
            ReadDataContext rdc = new ReadDataContext("readStore");

            var tv = rdc.Query <Television>().FirstOrDefault(x => x.Id == id);

            return(Request.CreateResponse(HttpStatusCode.OK, tv));
        }