Exemplo n.º 1
0
 public void OnGet()
 {
     MemeCreationRepository repo = new MemeCreationRepository();
     repo.Insert(MemeCreation);
     if (string.IsNullOrWhiteSpace(MemeCreation.MemeImage.Url))
     {
         MemeImageRepository imgRepo = new MemeImageRepository();
         MemeCreation.MemeImage.Url = imgRepo.GetMemeImageUrl(MemeCreation.MemeImageId);
     }
 }
Exemplo n.º 2
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();
            }
        }