Last post Oct 19, 2010 03:37 PM by jjfrick
Oct 15, 2010 08:35 AM|jjfrick|LINK
I have two tables: Residence and ResHistory. Residence contains current residence address information and ResHistory is an archive of past residence information.
Both tables contain a StartDate and an EndDate. In the Residence table the EndDate is always empty but if the user enters a date in this field when updating the record, I want to copy the record to the ResHistory archive table then create a new record in
the Residence with the same userID.
I've found some references including this link on Execute Business Logic During Scalar Property Changes:
http://msdn.microsoft.com/en-us/library/cc716747.aspx but I'm not sure if this is the best approach. I'm sure someone has done something similar with EF and might provide some tips.
entity tracking logging archiving
Oct 15, 2010 08:08 PM|sjnaughton|LINK
Hi Jeff, I would always do this sort of logic in a SPROC and map the SPROC to the TABLE overriding the dynamic sql.
Oct 19, 2010 03:37 PM|jjfrick|LINK
Thanks Steve. It's all new to me, and this helps.