views:

23

answers:

1

When you create a model using LinqToSql, the designer puts an attribute for each table class that looks like

[Table(Name=@"dbo.Project")]

At design time this is easy to change either manually or using T4 templates.

Can this table attribute be changed at runtime?

+1  A: 

Attributes are baked into the metadata of the class at compile time and I doubt it is possible changing their values at runtime. By the way that's one of the reasons why attribute values should always be constant expressions.

Darin Dimitrov