What I have:
LINQ to SQL auto generated class, which corresponds to the shape of its SQL table.
TABLEA ======== column1 column2
What I want to do:
Extend TABLEA class to include a new property, whose related column will be present only when a particular stored procedure is called. The stored procedure return type will be of TABLEA.
TABLEA ======== column1 column2 newcolumn3 (always part of the class structure, not always populated)
What I've done so far:
Created a partial class with a property and a columnattribute, which works when the stored procedure is called. When a direct table call is made, I get an invalid column exception.
My question is:
How do I extend my LINQ to SQL data class to populate a property from a column which may not be present?