moneycollector
Sometimes: Object Null Exception when using var rdr = await cmd.ExecuteReaderAsync();
The cmd.ExecuteReaderAsync sometimes get NullException.
Source:
public async Task<GetNavigationBarBulletsContent> Get([FromServices] MySqlDataSource dbBroadcast )
{
await using var conn = await dbBroadcast.OpenConnectionAsync();
string qChannelsToScan = "SELECT channel_id FROM channels_members WHERE member_id = @my_id";
using var cmdChannelsToScan = new MySqlCommand(qChannelsToScan, conn);
cmdChannelsToScan.Parameters.AddWithValue("my_id", internal_id);
using var rdrChannelsToScan = await cmdChannelsToScan.ExecuteReaderAsync(); // Here is the NullException thrown
}
27 replies