I am extending LINQ to SQL entity classes using partial classes, and I'm wondering how to best reset some properties on the entity objects to their default state.
My partial classes uses no unmanaged recourses. And as far as I can tell; neither does the LINQ to SQL entity classes. So I'm thinking that I'll implement IDisposable
and handle the resetting of properties inside of Dispose()
.
- What are your thoughts on this approach?
- And would you set before mentioned properties to
null
or something else?