C# guid and SQL uniqueidentifier

前端 未结 5 1779
你的背包
你的背包 2020-11-27 15:37

I want to create a GUID and store it in the DB.

In C# a guid can be created using Guid.NewGuid(). This creates a 128 bit integer. SQL Server has a uniqueidentifier

5条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 16:42

    Store it in the database in a field with a data type of uniqueidentifier.

提交回复
热议问题