Due to auditing purpose, we are not supposed to delete records from the database. Instead we update a flaf which will mark it as deleted. Is there a way to accomplish this is Dynamic Data?
At current I am overriding the partial method in datacontext and executing my own query. I wanted to check if other members in the community have a different approach.
Auditing is typically implemented in stored procedures. Map delete to your delete sproc which will update the deleted field. Dynamic Data has no built in support for this - it's really a data model question (EF or L2S). Both models allow mapping to sprocs.
Hi Tinac99, I would look at using WCF RIA Services and the DD Domain Service project also have a look at David Ebbo's video from MIX09 showing how to setup domain service project here
http://videos.visitmix.com/MIX09/T47F
Domain ServiceDynamic Data 4WCF RIA Services
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
Member
2 Points
22 Posts
Does Dynamic Data support soft delete feature?
Apr 10, 2009 05:36 PM|jayanthurs|LINK
Due to auditing purpose, we are not supposed to delete records from the database. Instead we update a flaf which will mark it as deleted. Is there a way to accomplish this is Dynamic Data?
At current I am overriding the partial method in datacontext and executing my own query. I wanted to check if other members in the community have a different approach.
ASP.NET Dynamic Data
Star
12522 Points
2214 Posts
Microsoft
Re: Does Dynamic Data support soft delete feature?
Apr 10, 2009 05:42 PM|ricka6|LINK
Auditing is typically implemented in stored procedures. Map delete to your delete sproc which will update the deleted field. Dynamic Data has no built in support for this - it's really a data model question (EF or L2S). Both models allow mapping to sprocs.
Member
48 Points
291 Posts
Re: Does Dynamic Data support soft delete feature?
Dec 13, 2010 05:07 PM|tinac99|LINK
Hi,
I'm doing a research on how to logically delete records. Can you please detail out the map delete to delete sproc?
Thanks,
Tinac99
Star
12522 Points
2214 Posts
Microsoft
Re: Does Dynamic Data support soft delete feature?
Dec 13, 2010 05:33 PM|ricka6|LINK
See tutorial 7 on getting started with EF
http://www.asp.net/entity-framework/tutorials/the-entity-framework-and-aspnet-–-getting-started-part-7
All-Star
17916 Points
5681 Posts
MVP
Re: Does Dynamic Data support soft delete feature?
Dec 14, 2010 04:17 AM|sjnaughton|LINK
Hi Tinac99, I would look at using WCF RIA Services and the DD Domain Service project also have a look at David Ebbo's video from MIX09 showing how to setup domain service project here http://videos.visitmix.com/MIX09/T47F
Domain Service Dynamic Data 4 WCF RIA Services
Always seeking an elegant solution.