Reputation: 6278
I have created custom build and compile actions for our dbml files. The "Build Action" is set to "dbml" and I was wondering if it is possible to inside the project somehow also embed the dbml file as a resource. The reason for this is that I want to run smoke tests at application startup where the dbml file is validated against the production db.
Upvotes: 0
Views: 919
Reputation: 12397
The dbml file itself is not embedded by default, it is only used at design-time to generate the cs classes. However, the mapping namespace allows you to traverse tables, members etc at runtime.
I guess you could embed the dbml file as a resource too, but since the mapping info is already there in the form of attributes on generated classes and members, and easily accessible through the mapping namespace that is an easier option.
Upvotes: 1