You must first add a new bit(boolean) column to your Table_Messages, you can name it readStatus. Make the default value to false(unreaded), and chagne it to true when the message become readed. Then you can use a command to show the messages that have Status==false.
You can do something like this:
using (SqlConnection conn = new SqlConnection(connString))
{
SqlCommand cmd = new SqlCommand("SELECT * FROM messages
WHERE Status = false", conn);
try
{
conn.Open();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
Wish this can help you! Good luck.