After many years I have finally ended up using an ORM in a production application I have been using Entity Framework 4 and have been very pleased with the breadth of features, however I have noticed one very annoying bug. The solution uses a SQL Server Database and the tables have GUIDs as primary keys with the default value set to NewID(). This works perfectly well until I tried to create a new record using EF. The GUID was set to the visual Studio default value {00000000-0000-0000-0000-000000000000} every time. After a brief check I found in order to let the database manage the setting of Primary Keys you need to set the StoreGeneratedPattern property for the entity property to ‘Identity’. This I did and still the same problem occurred.
It turns out there is a bug in the designer which does not propagate the changes through to the SSDL correctly. Luckily there is a workaround.
First you need to change the StoreGeneratedPattern property in the EDM Designer.

Then you need to open the EDM file using a text editor, simply right click on the file and chose Open With…

At the top of the file the SSDL is defined, the file starts by defining the tables and and relationships, and then goes on to define the entities and their storage models (as shown below)

You need to add the StoreGeneratedPattern attribute and give it a value of Identity.

Once you have done this save the file, and reopen it in the designer you will need to resave the file using the designer, so just make a minor change, such as changing the positions of one of the entities, to get the file to allow you to resave.
The same technique can be used for non primary key values where there is a default set in the database just use ‘Generated’ instead of ‘Identity’ for the StoreGeneratedPattern property value.