Forum Discussion
Micheal_Hastrup
Jul 15, 2022Copper Contributor
Send Http Get request to a web api
I am trying to send a get request to my web api project: [HttpGet] public async Task<IActionResult> GetArtists() { var artists = await (from artist in _dbContext.Artists select new { Id = ar...
MarcoEnxuto
Jul 16, 2022Copper Contributor
This is the way i would do.
These type of questions should be done in Microsoft Q&A.
[HttpGet]
public async Task<IActionResult> GetArtists()
{
var artists =await _dbContext.Artists.ToListAsync();
return Ok(artists);
}