I had this insidious error: "invalid cast" along with an long and difficult stack trace which pointed to a function called "TryCreateKeyFromValue." After several hours of changing things and scouring the forums for a solution: I found one. on stackoverflow.com. I had an association in my dbml file that did not use a primary key (although it was unique). Once I deleted it, my "Save" button worked again. So I've posted this, because I could easily forget all these details.