while (reader.Read())
{
var g = reader.FieldCount;
if (g > 0)
{
string a = reader.GetString(1);
string b = reader.GetString(3);
string c = reader.GetString(4);
string d = reader.GetString(5);
await context.PostAsync($" ### Please find below the fleet policy information \n #### Policy number - " +
$"`{a}` \n #### Policy type - `{b}` \n #### Property - `{c}` \n #### Number - `{d}` ");
}
else
{
await context.PostAsync("Record not found");
}
}
If record does not exist in database I want the bot to display record not found but it seem not to work, instead it displays nothing.