I have
public static async Task<IEnumerable<ParseTask>> GetArchiveTodos()
{
using(SqlConnection connection = new SqlConnection(SharedInfo.ConnectionString))
using(SqlCommand command = new SqlCommand("GetArchiveTodos", connection))
{
command.CommandType = CommandType.StoredProcedure;
await connection.OpenAsync();
SqlDataReader row = await command.ExecuteReaderAsync();
while(await row.ReadAsync())
{
ParseTask pageToParse = new ParseTask()
{
Id = row.GetInt32(0),
PageType = row.GetString(1),
Html = row.IsDBNull(2) ? null : row.GetString(2),
ThreadId = row.IsDBNull(3) ? null : (int?)row.GetInt32(3),
PageNum = row.GetInt32(4)
};
yield return pageToParse;
}
}
}
and I'm getting the error
Severity Code Description Project File Line Suppression State Error CS1624 The body of 'ArchiveDb.GetArchiveTodos()' cannot be an iterator block because 'Task>' is not an iterator interface type