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); } }
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(); } }