Sql – Generation custom files from dbml file

dbmllinq-to-sqlsqlmetal

I've been having a look at making changes to the partial classes generated from a DBML file. I was reading into using the sqlmetal.exe tool but it appears that you can't do much customisation of what it actually spits out.

I'm wanting to make changes to the file for serialization purposes, I'd like to add the Data Member Attribute to specified properties in the generated partial classes.

Is this possible to do using the sqlmetal.exe tool or would I need to write my own tool for the file generation?

Best Answer

You could check out T4 templates or CodeSmith for file generation.

Related Topic