Beispiel #1
0
        public IEnumerable <BinhLuan> Get()
        {
            BinhLuanDAO blO = new BinhLuanDAO();

            BinhLuan[] bl = new BinhLuan[blO.getDsBinhLuan().Count];
            bl = blO.getDsBinhLuan().ToArray();
            return(bl);
        }
Beispiel #2
0
        // GET: api/BinhLuan/5
        public IEnumerable <BinhLuan> Get(string id)
        {
            BinhLuanDAO blO = new BinhLuanDAO();

            BinhLuan[] bl = new BinhLuan[blO.getDsBinhLuan(id).Count];
            bl = blO.getDsBinhLuan(id).ToArray();
            if (bl.Length == 0)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
            return(bl);
        }