Nullable GUID

后端 未结 10 2102
北荒
北荒 2020-12-15 04:36

In my database, in one of the table I have a GUID column with allow nulls. I have a method with a Guid? parameter that inserts a new data row in the table. However when I s

10条回答
  •  有刺的猬
    2020-12-15 04:38

    Guid? _field = null;
    if (myValue!="")//test if myValue has value
    {
    _field = Guid.Parse(myValue)
    }
    

提交回复
热议问题