Using T-SQL

Listing 5.

String sqlCommandText = "INSERT Books (Title, Author, ISBN, Rating)   
  VALUES('Effective C#','Bill Wagner','0-321-24566-0', 5)";
cmd.CommandText = sqlCommandText;
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();