Tenho o seguinte código:
public async Task<IHttpActionResult> Gravar()
{
List<Tuple<string, string>> statusRetorno = new List<Tuple<string, string>>();
statusRetorno.Add(new Tuple<string, string>("1245", "OK"));
statusRetorno.Add(new Tuple<string, string>("1468", "ERROR"));
statusRetorno.Add(new Tuple<string, string>("7548", "OK"));
return Ok(statusRetorno);
}
Tenho que mudar o código acima:
Caso todos os Tuple forem "OK" retorno
return Ok(statusRetorno)
Caso tiver um "ERROR" tenho que retornar
InternalServerError(new Exception(statusRetorno)
Tenho o seguinte erro, se tentar retornar 'InternalServerError'
Cannot convert from 'System.Collections.Generic.List(System.Tuple' to 'string'
Qual seria a melhor forma de retornar essas informações?