Dave
Dave

Reputation: 12487

LinqPad row id not getting updated after SubmitChanges()

Node n = new Node(){
    Title = "test"
};
Nodes.InsertOnSubmit(n);
SubmitChanges();
n.Id.Dump();

It will dump 0.

In the database table, the row is inserted with the correct (auto-incremented) id. I'm just wondering if this is a setup issue since I'm using the IQ driver with MySql.

Thanks for any help!

Upvotes: 1

Views: 603

Answers (1)

Joe Albahari
Joe Albahari

Reputation: 31004

Your code is correct - this is a limitation in the IQ driver.

Upvotes: 1

Related Questions