public Manga() { InitializeComponent(); var manga = new MangaViewModel(); DataContext = manga; }
public MangaViewModel GetInfoById(int id) { var manga = this.mangaRepo.AllAsNoTracking().Where(x => x.Id == id).FirstOrDefault(); var model = new MangaViewModel { Title = manga.Title, Authors = manga.Authors, Synopsis = manga.Synopsis, Volumes = manga.Volumes, Chapters = manga.Chapters, Published = manga.Published, PictureUrl = manga.PictureUrl, Genres = manga.Genres, }; return(model); }
//[Route("/Home/Manga/{search}")] public IActionResult Manga(string search) { //All if (search == "All") { var Mangas = db.Mangas.ToArray(); var model = new MangaViewModel { Mangas = Mangas }; return(View(model)); } else { var Mangas = db.Mangas.ToArray().Where(m => m.MangaNameLat.Contains(search)); var model = new MangaViewModel { Mangas = Mangas }; return(View(model)); } }
public override Task UpdateChapter(MangaViewModel m) { throw new NotImplementedException(); }
public MangaDetailViewModel(MangaViewModel mangaViewModel) { _manga = mangaViewModel.Manga; _mangaSource = mangaViewModel.MangaSource; }
public MangaInfoControl() { this.InitializeComponent(); this.DataContextChanged += (s, e) => { ViewModel = DataContext as MangaViewModel; }; }