示例#1
0
        public IEnumerable <Video> GetVideosAccordingToUserType(string searchString)
        {
            var userType = (string)Session["loggedInUserUserType"];

            if (userType == "ADMIN")
            {
                return(_videosRepository.GetVideosAllAndSearch(searchString));
            }
            else
            {
                return(_videosRepository.GetVideosPublicAndSearch(searchString));
            }
        }