Insert簽名是這樣的,將第2個參數設置爲true就會返回剛插入的自增列ID了,而後能夠手工賦值到對象上面去this
public static long Insert<T>(this IDbConnection dbConn, T obj, bool selectIdentity = false) { return dbConn.Exec(dbCmd => dbCmd.Insert(obj, selectIdentity)); }對象