I have a database and a set of objects created by O / R-Mapper using all this with LINQ.
In O / R-Mapper, I need to enter a table name (source) for each table that is used for SQL generated by LINQ. In the .dbml file, it looks like this:
<Table Name="dbo.Customers" Member="Customers">
Now I would like to change this table name at runtime, so that SQL will work against some other table (customers2008 instead of the client, for example).
Is there a way to change the table name (source name) at runtime?
[Update]. After some testing for my disappointment, I had to find that XmlMappingSource renders computed properties that are not stored in the database are not available (yes, even the mapping created by SqlMetal ignores everything that is not saved).
Sam
source share