Пример #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);
     }
 }
Пример #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();
            }
        }