Esempio n. 1
0
        public ActionResult Index()
        {
            IEnumerable <Video> videos = null;

            if (UsersHelper.LoggedInUserIsAdmin(Session))
            {
                videos = _videosRepository.GetNRandomVideos(6);
            }
            else
            {
                videos = _videosRepository.GetNRandomPublicVideos(6);
            }

            IEnumerable <VideoDTO> vdto = VideoDTO.ConvertCollectionVideoToDTO(videos);

            return(View(vdto));
        }