I want to get primarykey ID of just insert item. In PHP has mysql_insert_id(). I write in C#
If cmd is your command object try:
cmd.LastInsertId;