I have a column (nullable) in the DB thats of type uniqueidentifier, when I generate my objects its gets translated to a Guid.
Now this might be more of a general programming C# question, but how do I set the System.Guid attribute on the object equal to null?
Other question is, why does the class get generated as a System.Guid and not a System.Data.SqlTypes.SqlGuid.Null?
Thanks
You set a Guid to null as far as I know. But, you can set it to Guid.Empty.
Log in to post a comment.
I have a column (nullable) in the DB thats of type uniqueidentifier, when I generate my objects its gets translated to a Guid.
Now this might be more of a general programming C# question, but how do I set the System.Guid attribute on the object equal to null?
Other question is, why does the class get generated as a System.Guid and not a System.Data.SqlTypes.SqlGuid.Null?
Thanks
You set a Guid to null as far as I know. But, you can set it to Guid.Empty.