.net core return async task result code example
Example 1: asp.net core task iactionresult
asp.net core task iactionresult
Example 2: custom async return object c#
try
{
var Collection = <query db context>
if (Collection == null)
{
return NotFound();
}
return Collection;
}
catch (Exception ex)
{
return new ObjectResult(ex);
}