tags:

views:

157

answers:

2

I don't know how to set up external mapping file for LINQ to SQL. I've read Ivan Latunov's blog post about it and it woke up my interest in it. The problem is that I don't understand how things should go. The main question is: what is the howto if I want only to modify xml mapping file? Do I first create .dbml file and then supply MappingSource object with information about the custom xml file or there is another better way?

+3  A: 

look into the SQLMetal utility (found by opening up a Visual Studio Command Prompt and typing the command in).

I think this allows you to just create maps either from databases or from pre-existing dbml files


After your first comment, I believe that this article is probably slightly closer to what you are looking for. It shows you how to load a custom mapping file at runtime

Matthew Steeples
SQLMetal is a code generator and I don need one. What about hand editing?
I have updated my answer after your comment
Matthew Steeples