public IActionResult Index(string q)
        {
            var query = repository.GelAll().Where(i => i.IsApproved && i.IsHome);

            if (!string.IsNullOrEmpty(q))
            {
                q     = q.ToLower();
                query = query.Where(i => i.ilanName.ToLower().Contains(q) || i.tecrube.ToLower().Contains(q) || i.firmasektoru.ToLower().Contains(q) || i.aciklama.ToLower().Contains(q));
            }
            return(View(query.ToList()));
        }
Пример #2
0
 public IViewComponentResult Invoke()
 {
     return(View(repository.GelAll().Where(i => i.IsApproved && i.IsFeatured).ToList()));
 }