views:

327

answers:

2

I'd like to use sqlmetal to generate dbml data contexts for my project, but the data context and all classes created are marked as public. As this is supposed to be an API layer I'd like to instead mark many of these classes or at least the context itself as internal. Is there a way to do this in sqlmetal or some other tool without having to go in and edit the dbml by hand?

+1  A: 

I believe this is one of the options that you can't do directly at the command line. You may indeed have to edit the dbml. However, this isn't a tricky change, so you should be able to automate it with a basic command-line tool.

Marc Gravell
A: 

You could try using my LINQ to SQL template that provides a drop-in replacement for the DBML to C#/VB.NET code generation process that you can completely customize.

[)amien

DamienG