I am trying to convert an existing (not LINQ to SQL) class to a LINQ to SQL entity class that has an existing property (db column), for example:
public string MyString { get { return myString; } set { myString = FormatMyString(value); } }
Is there a way to do this kind of processing for the value of a property of an object class before saving?
Should I use some kind of persistence event at the entity level where formatting can be done (if that works)?
I know that LINQ to SQL provides validation and creates partial On...Changing() methods that provide access to the new value by value (not by reference), but none of these methods provide a way to actually change / format the value while setting it.
Thank you for your help.
source share