LINQ to SQL Dynamic Mapping
Posted by: Guy Barrettes WebLog,
on 23 Jul 2008 |
View original | Bookmarked: 0 time(s)
The problemYou have SQL Servers for each of your environments (development, test, pre-prod, production) and in each one, the table names are different. In fact, its not the table names that are different but the schema names but since the schema name is part of the table name, it must be specified.Ex : dev.ZeTable et prod.ZeTable
Easy to solve, right? Just put the schema value in the config file and do a simple concatenation at runtime. Well, its not as easy as it seams because...