Print Page | Close Window

Pre-commit functionality...

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2995
Printed Date: 04-Sep-2025 at 10:33pm


Topic: Pre-commit functionality...
Posted By: as123
Subject: Pre-commit functionality...
Date Posted: 09-Oct-2011 at 3:42pm

             Is it is possible to do any kind of validation as part of saving entities, after the transaction has opened, but before the commit operation? This is required so that the validation logic that is in a sql server stored procedure can access the data that is being saved (but not committed yet) as part of the validation and disallow save if the validation fails. We cannot do this kind of logic in the client as the client may not have all the data retrieved into the Entity Manager. Essentially, what I am looking for is a kind of pre-commit event as part of the SaveChanges() method.

 

Thanks




Replies:
Posted By: sbelini
Date Posted: 10-Oct-2011 at 10:22am
Hi as123,

You might find what you are looking for in the SaveInterceptor in the server.
You will find more details in the http://drc.ideablade.com/xwiki/bin/view/Documentation/save-lifecycle-server - DevForce Resource Center .

Regards,
   Silvio.


Posted By: as123
Date Posted: 10-Oct-2011 at 3:52pm
               If you have any sample code to accomplish the pre-commit (not just pre-save) functionality using SaveInterceptor, please provide me the link.

               I could not find much information about pre-commit in 
http://drc.ideablade.com/xwiki/bin/view/Documentation/save-lifecycle-server - http://drc.ideablade.com/xwiki/bin/view/Documentation/save-lifecycle-server .

Thanks



Print Page | Close Window