public async Task <IActionResult> Details(int Id) { TempData["Active"] = "Dizi"; var result = await _serieService.Get(Id); return(View(result.Data)); }
public async Task <IActionResult> Get(int id) { try { var serie = await service.Get(id); return(Ok(serie)); } catch (NotImplementedException) { return(NotFound()); } }
private void SerieList() { listViewSerie.Items.Clear(); var list = serieService.Get() .Select(x => new { Id = x.Id, BrandName = x.Brand.BrandName, SerieName = x.SerieName }).ToList(); foreach (var item in list) { ListViewItem viewItem = new ListViewItem(item.Id.ToString()); viewItem.SubItems.Add(item.BrandName); viewItem.SubItems.Add(item.SerieName); listViewSerie.Items.Add(viewItem); } }