예제 #1
0
        public override ViewResult Index()
        {
            var model = new FavouriteViewModel();


            model.CompanyFavorites = _favouriteRepository.GetCompanyFavourite().ToList();
            var favourite = _favouriteRepository.GetFavourite(HttpContext.User.Identity.Name);

            if (favourite != null && favourite.Any())
            {
                model.PersonalFavorites = favourite.Where(x => !x.IsCompany).ToList();
            }

            return(View(model));
        }