开发者

Subsonic 2.1 : Way to ignore a column while generating code?

开发者 https://www.devze.com 2023-01-13 02:54 出处:网络
For some reason, a row named \"rowguid\" with a \"uniqueidentifier\" parameter was added to some tables on an already existing project. While regenerating the code, I found out that a method named \"I

For some reason, a row named "rowguid" with a "uniqueidentifier" parameter was added to some tables on an already existing project. While regenerating the code, I found out that a method named "Insert(string Key)" was used, but doesn't exists anymore (it's now Insert(string Key, Guid varRowguid).

Is there a way to "ignore" a column while generating the code?

Note : The default of this new "rowguid" column is the Sq开发者_开发百科l server method newsequentialid()

UPDATE : I added a "new System.GUId()" as a second parameter but I'd like to not have to modify the code...


With subsonic 2.1, you can edit the templates that are used to generate the code. I've added a "IF" and checked the "rowguid"... if it's the case, just ignore it.

0

精彩评论

暂无评论...
验证码 换一张
取 消