Search code examples
c#linq-to-sqlsql-server-2008dbmlsqlmetal

How do I use sqlmetal to generate an internal (not public) data context


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?


Solution

  • 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.