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
2009-06-12 21:44:51
SQLMetal is a code generator and I don need one. What about hand editing?
2009-06-13 05:21:42
I have updated my answer after your comment
Matthew Steeples
2009-06-13 15:33:53
A:
- Linq to SQL - Mapping Tables to Objects
- LINQ to SQL external mapping file
- Mapping options in LINQ to SQL
- Being Ignorant with LINQ to SQL
- How to: Generate the Object Model as an External File
- External Mapping
- ASP.NET MVC Tip #23 – Use POCO LINQ to SQL Entities
- Linq to SQL Xml Based Mapping
- Using LINQ to SQL XML Mapping Files - Step by Step
alexandrul
2009-07-16 07:51:23