After installing RTM on my laptop, I all of my Beta 2 Linq to SQL diagrams refused to open and save the error.
“Cannot load ‘path’: Error encountered, check Error List window for details”.
The error list had the following error
“Error 2 There is no Unicode byte order mark. Cannot switch to Unicode. 1 1 TestingLinqToSQL”
In the properties for the dialog, it was already set as Unicode. To fix this, in the xml header for the diagram, in Beta 2 it was ““. RTM requires the encoding to be utf-8 (). Set the xml declaration to this, save and reopen and your diagram should be working again.
Technorati Tags: Linq
I am interested to know how you can also use SPROCs to override the update/insert/delete logic when you SubmitChanges() on your DataContext to persist back to the database.
Regarding using SPROCs, include methods in the custon Partial class implementation of your entity classes for InsertT, UpdateT, DeleteT, where T is your class name. They will be called instead of the standard runtime dynamically generated SQL statements. Consuming SPROCs with LINQ is as easy as calling functions. Realize that when using SPROCs you loose the automatic concurrency tracking and field use optimizations that LINQ can provide.