Ejemplo n.º 1
0
        public async Task <TorrentView> Post(TorrentCreateView model)
        {
            var torrent = _mapper.Map <Torrent>(model);

            var result = await _torrentService.AddAsync(torrent);

            return(_mapper.Map <TorrentView>(result));
        }
Ejemplo n.º 2
0
 public async Task <TorrentView> AddAsync(TorrentCreateView model)
 {
     return(await _httpClientService.PostJsonAsync <TorrentView>(_apiOptions.Torrents, model));
 }