{"id":73,"date":"2005-11-18T11:32:06","date_gmt":"2005-11-18T15:32:06","guid":{"rendered":"http:\/\/www.soulhuntre.com\/items\/date\/2005\/11\/18\/net-issues-using-uniqieidentifier-as-a-primary-key-in-vs2005\/"},"modified":"2005-11-18T11:32:06","modified_gmt":"2005-11-18T15:32:06","slug":"net-issues-using-uniqieidentifier-as-a-primary-key-in-vs2005","status":"publish","type":"post","link":"http:\/\/legacyiamsenseiken.local\/2005\/11\/18\/net-issues-using-uniqieidentifier-as-a-primary-key-in-vs2005\/","title":{"rendered":".Net – issues using uniqieidentifier as a primary key in VS2005"},"content":{"rendered":"

Ok. First Visual Studio 2005 bug, complete with my work around. Now, this bug is apparently known and a few semi-workarounds exist<\/a> but they all have issues not the least of which is hand editing of my nice shiny new generated code and other crap.<\/p>\n

The problem<\/u>: It seems that Visual Studio will totally fail to correctly deal with tables that use a uniqueidentifier<\/i> column type as their primary key<\/b>. And yes, that sucks deeply and hugely.<\/p>\n

Assuming you absolutely need a guid<\/i><\/b> associated with each record (and there are good reasons for this) it turns out after some reflection you almost certainly do not need it to be the primary key for that table. You can let VS2005 have it’s integer based identity column and simply give yourself a nice little guid column for your own future use.<\/p>\n

Your happy, VS2005 is happy, your records have a guid and life, as they say, is good.<\/p>\n","protected":false},"excerpt":{"rendered":"

Ok. First Visual Studio 2005 bug, complete with my work around. Now, this bug is apparently known and a few semi-workarounds exist but they all have issues not the least of which is hand editing of my nice shiny new generated code and other crap. The problem: It seems that Visual Studio will totally fail […]<\/p>\n","protected":false},"author":3,"featured_media":56266,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[278],"tags":[],"_links":{"self":[{"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/posts\/73"}],"collection":[{"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":0,"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/media\/56266"}],"wp:attachment":[{"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/legacyiamsenseiken.local\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}