public IEnumerable <BinhLuan> Get() { BinhLuanDAO blO = new BinhLuanDAO(); BinhLuan[] bl = new BinhLuan[blO.getDsBinhLuan().Count]; bl = blO.getDsBinhLuan().ToArray(); return(bl); }
// 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); }