hey, there, is there any way to ass a NON DB property to a Linq-to-SQL class? (etc calculated fields), I'm getting an error when trying
Asked
Active
Viewed 291 times
0
-
**WHAT** error are you getting?? – marc_s Oct 24 '10 at 14:01
1 Answers
2
Linq2Sql generates your entities as partial classes. This makes it easy to extend these classes yourself without modifying the code generated by L2S (which is a bad idea since it will be overwritten if you update your model and regenerate.)
Just find the partial class definition and create a new source file where you declare the same partial class. Inside that new class, add the property or methods that you want to use in your code but Linq2Sql will not have any knowledge of.

Erik Noren
- 4,279
- 1
- 23
- 29