New Posts New Posts RSS Feed: Custom Entity Properties
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Custom Entity Properties

 Post Reply Post Reply
Author
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Topic: Custom Entity Properties
    Posted: 22-Jun-2011 at 3:03pm
Great, thanks.  I had forgotten about that property!
 
Greg
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 22-Jun-2011 at 12:35pm
Hi gregweb;

Have you marked the NewEmailCount property with the [DataMember] attribute? I've tested this and the custom property value is retained if you have marked it as it needs to be serialized over the wire.


Edited by DenisK - 22-Jun-2011 at 12:38pm
Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Posted: 17-Jun-2011 at 6:24pm
I have an Entity called EmailFolder.  In code, I add an int property called NewEmailCount.  I then link it to the SL project so it is accessible on both the client and server.  I then pass an instance of the entity from SL up to the Server via an  InvokeServerMethod, do some stuff, set the property and pass it back to the client.
 
The issue is that the NewEmailCount is always zero when it gets back to the client.  Is this correct?  It seems to me that it would be serialized and sent back over the wire to the client with the value intact.  But perhaps unless it part of the actual entity, it is just discarded and resets to the default value once it gets back to the client.
 
The reason the property is not back by a database element is that I don't really need to save the property.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down