How can I add my attributes to Code-Generated Linq2Sql classes properties?

前端 未结 6 805
甜味超标
甜味超标 2020-12-01 10:49

I would like to add attributes to Linq 2 Sql classes properties. Such as this Column is browsable in the UI or ReadOnly in the UI and so far.

I\'ve thought about usi

6条回答
  •  渐次进展
    2020-12-01 11:20

    You can also write/use another code generator in place of the default MSLinqToSQLGenerator.

    One option to start from is this one.

    I built my own, according to my needs. I don't know if there is a way to indicate which attributes must be placed in each property using the DBML Designer, or xml file, but maybe you can find a way to use this alternative to help you with your problem.

提交回复
热议问题