public static async Task <List <PaperDto> > Get(string alias) { var papers = new List <PaperDto>(); var articles = await PubMedHelper.SearchByAliasAsync(alias); foreach (var article in articles) { papers.Add(await Get(Convert.ToInt32(article))); } return(papers); }
public static async Task <PaperDto> Get(int?pmid) { var search = await PubMedHelper.SearchByPMIDAsync(pmid); if (search == null) { throw new NullReferenceException("No se encontró nada para la búsqueda asignada"); } var paper = await PubMedHelper.SearchPMIDResultsAsync(search); return(paper); }