//protected override async Task OnInitializedAsync() //{ //} protected override async Task OnParametersSetAsync() { Id = Id ?? "1"; Article = await ArticleService.GetAsync(int.Parse(Id)); foreach (var picture in Article.Pictures) { var pic = new PictureVM { Id = picture.Id, MSource = PictureExtensions.ImagePath(picture.Id + picture.Extension, "m", picture.Created), NSource = PictureExtensions.ImagePath(picture.Id + picture.Extension, "n", picture.Created), Active = "" }; Pics.Add(pic); } if (Pics.Count > 0) { Pics.First().Active = "active"; } }