public ActionResult <List <Annonce> > List(string title) { Expression <Func <Annonce, bool> > condition = x => true; if (title != null) { condition = x => x.Title.Contains(title) || x.Description.Contains(title); } var res = _service.List(condition); if (res.Count == 0) { return(NoContent()); } return(res); }