Manual Linq to SQL entity framework mapping

Posted by kprobst on Stack Overflow See other posts from Stack Overflow or by kprobst
Published on 2010-05-21T19:30:17Z Indexed on 2010/05/21 19:40 UTC
Read the original article Hit count: 193

Filed under:
|

I've been playing with the O/R designer in VS and I was wondering if someone could shed come light on this. I'm used to OR mappers that are largely manual (homegrown and e.g., NHibernate). I don't mind encoding the entity classes myself, since they don't change all that often to begin with, and I have this irrational fear of designers and auto generated code as it is.

I have noticed that the generated entity classes contain a lot of boilerplate extensibility methods, e.g. On[Property]Changed() and so on where [Property] is a mapped member of the class. These are placed in the setters of the property accessors. I assume it's OK if I don't include these when I do my hand coding, correct? They would be nice if I needed some sort of interception pattern but that's certainly not the case.

I guess I just need to know if any of those methods are required by the entity framework to keep track of changes to the mapping types in order for things to work when updating the database.

Thanks!

© Stack Overflow or respective owner

Related posts about linq-to-entities

Related posts about orm