public ActionResult Search(string search)
        {
            var top10 = db.Tutors.Where(c=>c.IsCompletedProfile==true).OrderByDescending(c => c.Rating).Take(10).ToList();
            var result = db.Tutors.Where(c => c.Username.Contains( search ) && c.IsCompletedProfile==true).ToList();
            var tutorExpertise = db.TutorsExpertise.Where(c => c.category.CategoryName.Contains(search)).ToList();
            SearchViewModel obj = new SearchViewModel();
            foreach (var v in tutorExpertise)
            {
                obj.Results.Add(v.tutor);
            }

            foreach (var v in result)
            {
                obj.Results.Add(v);
            }


            obj.Top10 = top10;
            return View(obj);
        }
        public ActionResult Search(string search)
        {
            var top10 = db.Tutors.Where(c=>c.IsCompletedProfile==true).OrderByDescending(c => c.Rating).Take(10).ToList();
            var result = db.Tutors.Where(c => c.Username.Contains( search ) && c.IsCompletedProfile==true).ToList();
            var tutorExpertise = db.TutorsExpertise.Where(c => c.category.CategoryName.Contains(search)).ToList();
            var onlineUsers = db.online.Where(c => c.Status == true).ToList(); ;

            SearchViewModel obj = new SearchViewModel();
            if (!string.IsNullOrEmpty(search))
            {
                foreach (var v in tutorExpertise)
                {
                    var isTutor = onlineUsers.Where(c => c.Username == v.tutor.Username).FirstOrDefault();
                    if (isTutor != null)
                        obj.OnlineResults.Add(true);
                    else
                        obj.OnlineResults.Add(false);

                    obj.Results.Add(v.tutor);
                }

                foreach (var v in result)
                {
                    var isTutor = onlineUsers.Where(c => c.Username == v.Username).FirstOrDefault();
                    if (isTutor != null)
                        obj.OnlineResults.Add(true);
                    else
                        obj.OnlineResults.Add(false);
                    obj.Results.Add(v);
                }
            }

            foreach(var v in top10)
            {
                var isTutor = onlineUsers.Where(c => c.Username == v.Username).FirstOrDefault();
                if (isTutor != null)
                    obj.OnlineTop10.Add(true);
                else
                    obj.OnlineTop10.Add(false);
            }

            obj.Top10 = top10;
            return View(obj);
        }