public async Task <TorrentDescriptionViewModel> GetTorrent(int id) { var torrent = await _torrentRepository.GetByIdAsync(id); var t = new TorrentDescriptionViewModel() { Id = torrent.Id, Title = torrent.Title, RegistredAt = torrent.RegistredAt, Size = torrent.Size, Content = BBCodeHelper.Format(torrent.Content), Dir_Name = torrent.Dir_Name, Forum = torrent.Forum, Files = torrent.Files }; return(t); }
public async Task OnGet(int id) { TorrentModel = await _torrentViewModelService.GetTorrent(id); }