Converting from using LocalProxy to remote DataPortalProxy with Web Service #1670
-
Hello, question for anyone that can help me. Since 2009, we've been using CSLA's The issue i have is that we've been using a lot of basic backing fields to hold data ( Is this correct? This appears to be the proper method, but i wanted to confirm before i started trudging through all our code making changes. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Have you overridden the default behavior of the local proxy to not clone the business object? If the local proxy is cloning the business object, and your code is currently working, then I believe moving to a remote data portal should be only a configuration change. If you are not cloning the business object, you could try enabling it and seeing what breaks. Managed properties without private backing fields is the recommended practice, but you can also use overrides of OnGetState and OnSetState to add your private backing fields into the serialized data stream. |
Beta Was this translation helpful? Give feedback.
-
I'd prefer to go down the recommended practice line without taking too many liberties. Could cause compatibility issues down the line. By the way, what benefit is there to cloning vs not cloning the object? That would be good to know just for my knowledge. |
Beta Was this translation helpful? Give feedback.
-
Thank you both. Sounds to me like the proper course of action is to keep cloning turned on and convert my private backing fields to CSLA managed properties. I appreciate the help. |
Beta Was this translation helpful? Give feedback.
Have you overridden the default behavior of the local proxy to not clone the business object? If the local proxy is cloning the business object, and your code is currently working, then I believe moving to a remote data portal should be only a configuration change.
If you are not cloning the business object, you could try enabling it and seeing what breaks.
Managed properties without private backing fields is the recommended practice, but you can also use overrides of OnGetState and OnSetState to add your private backing fields into the serialized data stream.