Пример #1
0
        public IHttpActionResult Delete(int id)
        {
            var dao = new NewsDAO();

            if (!dao.isExist(id)) // Kiem tra xem id co hop le hay khong
            {
                return(NotFound());
            }
            var check = dao.Delete(id); // Kiem tra viec thuc hien Delete

            return(Ok(check));
        }
Пример #2
0
 /// <summary>
 /// 删除资源(连同其下资源评论一起删除)
 /// </summary>
 /// <param name="id">资源id</param>
 /// <returns></returns>
 public bool Delete(string id)
 {
     return(ndao.Delete(id));
 }
Пример #3
0
 /// <summary>
 /// 删除新闻(连同其下新闻评论一起删除)
 /// </summary>
 /// <param name="n">新闻ID</param>
 /// <returns></returns>
 public bool Delete(string n)
 {
     return(ndao.Delete(n));
 }