Exemplo n.º 1
0
        public void OnGet()
        {
            Initialize();
            MemeImageRepository repo = new MemeImageRepository();

            MemeImages = repo.GetAllMemeImages();

            if (ImageSelected > 0)
            {
                //Show the meme on the page
                SelectedImageUrl = repo.GetMemeImageUrl(ImageSelected);

                //Save the meme in DB
                SaveMemeInDb();
            }
        }
Exemplo n.º 2
0
        public void OnGet()
        {
            MemeImageRepository memeImagesRepo = new MemeImageRepository(@"Data Source=(localdb)\mssqllocaldb;Initial Catalog=MemeGenerator;Integrated Security=True;");

            MemeImages = memeImagesRepo.GetAllMemeImages();
        }