SubSonic 3.0 - Save method with all columns as parameters?
Posted
by Todd Menier
on Stack Overflow
See other posts from Stack Overflow
or by Todd Menier
Published on 2010-04-20T19:40:43Z
Indexed on
2010/04/20
19:43 UTC
Read the original article
Hit count: 296
Hi, Just getting started with SubSonic. I'm using the Repository pattern, so my domain objects are totally seperate, and SubSonic-generated classes are used only in my data access layer.
I'm wondering if a template exists that will give me a Save method (Insert/Update) that requires all table column values as parameters. My thinking is that since I need to do the mapping work manually, at least if my database schema changes (ie, a new column is added), I won't forget to add a corresponding mapping, since the auto-generated method signature would change and the compiler would catch it.
I've considered messing with the T4 templates to add this feature, but thought I'd check if this already exists somewhere before I head down that path.
Thanks in advance.
© Stack Overflow or respective owner