Hi
What is the best data type to choose in C# for representing a SQL Serer UniqueIdentifier type? I'm was going to use a GUID but I've seen people using varChars.
Thanks
Hi
What is the best data type to choose in C# for representing a SQL Serer UniqueIdentifier type? I'm was going to use a GUID but I've seen people using varChars.
Thanks
System.Guid is what you need.
You can learn about CLR equivalents of SQL data types in this article:
Whenever I use a uniqueidentifier sql data type I always map it to a Guid in C#. I don't think I've ever seen it done differently.