How to get UUID generated by MySQL into a C# variable
问题 Here is the query: string query = @"INSERT INTO session (PK_Id, user_id, login_time, machine_ip, machine_fingerprint) VALUES (UUID(), @UId, @LogInTime, @MIp, @MFingerPrint); "; Now I need this last inserted id back, which is a UUID generated by MySQL. As far as I read there is no select_last_insert_id() function for UUIDs!! And I read for php you could assign UUID() function first to a variable and then return that value. But how to go about that in C#? Something like this, but not exactly: