LLBLGen and GUIDs

Posts   
 
    
mario.muja avatar
mario.muja
User
Posts: 37
Joined: 03-May-2005
# Posted on: 04-May-2005 10:44:07   

Hi, we want to use SQL Server replication and therefore plan to use GUIDs as primary keys. Does LLBLGen support this? Is there anything important to consider?

Thanks a lot in advance.

Best Regards, Mario

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 04-May-2005 11:24:47   

LLBLGen Pro supports all types of the databases supported, thus also GUIDs. Be sure that you don't define GUIDs in the db, with newid() or RowId(), as these values can't be read back after an insert. Set the GUIDs in the client:

CustomerEntity c = new CustomerEntity(); c.CustomerID = Guid.NewGuid(); //...

c.Save();

Frans Bouma | Lead developer LLBLGen Pro