Print Page | Close Window

IEntityServerSaving

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=2881
Printed Date: 14-Jun-2025 at 4:36am


Topic: IEntityServerSaving
Posted By: ehtleef
Subject: IEntityServerSaving
Date Posted: 09-Aug-2011 at 6:12am
Hi,
I'm trying to implement interface IEntityServerSaving 
and use it's ServerSaving event.
In my project I have referenced IdeaBlade.EntityModel.Server.

My problem is that I can't see this interface.
I can only access: IdeaBlade.EntityModel.Server.IHandlePolicy

Any ideas?



Replies:
Posted By: sbelini
Date Posted: 09-Aug-2011 at 10:16am
Hi ehtleef,
 
IEntityServerSaving is not present in DevForce 2010. You might want to take a look at the EntityServerSaveInterceptor class.
 
You can find detailed information at the http://drc.ideablade.com/xwiki/bin/view/Documentation/save-lifecycle-server - DevForce Resource Center .
 
Regards,
   Silvio.


Posted By: ehtleef
Date Posted: 10-Aug-2011 at 2:19am
Thanks,
That helped but I still have problem.
The EntityManager doesn't return entities marked (EntityState.Unchanged). 


In callback to entity.save 
in argumants there is proparty Cancelled.
Is ther any way to pass some string or int with information why save was cancelled?



Posted By: sbelini
Date Posted: 10-Aug-2011 at 1:54pm
Hi ehtleef,
 
Unfortunatelly, you won't be able to return a custom message from a SaveChanges/SaveChangesAsync call if it's cancelled.
 
Can you explain in detail what you are trying to accomplish, so I can better understand and assist you?
 
Silvio.


Posted By: ehtleef
Date Posted: 11-Aug-2011 at 2:17am
Saving operation can be canceled for two reasons. 
I would like to inform user which value was incorrect and what was the reason.



Print Page | Close Window