Q:

linq to sql OnLoaded() with SQL View?

I am trying to extend my Linq-to-Sql entity with a few extra properties.  These are "calculated" properties based on data from the underlying SQL View.  For example, think of having a Date of Birth field, which is used to calculate an extended Age field.
I tried to extend my entity class by extending the OnLoaded() method.
I get a compile time error however stating that I cannot create it.  I checked the designer code for my LTS entity class, and it doesn't have a partial definition for any of the expected extension points.
I checked a few of my other LTS entity classes and they do have these extension points.  The only difference I see is that the one without is loaded from a SQL View, rather than a table.  Is there a way to hook into a "Loaded" event when loading from a SQL View?
TIA!

A:

I found that I did not have a PrimaryKey specified for my Linq-to-Sql entity class.  I believe without a Primary Key specified, no extension methods generated in the entity class.  Once I specified a Primary Key on my LTS entity class definition (through the designer), I was able to extend the OnLoaded() event.

