Converting an Object to InMemory...

Thread is closed for posting
2 posts, 0 answers
  1. Steve
    Steve avatar
    1886 posts
    Member since:
    Dec 2008

    Posted 02 Jul 2010 Link to this post

    How can I convert an object I grab with GetNewObjectScope to a memory object (not linked to the DB) so I dispose of my scope properly?

    (Trying to return data from a WCF service)

    ...don't really want to use fetch plans, I just need a populated object which doesnt even need to be updated when it gets back to the client.
  2. Alexander
    Alexander avatar
    727 posts

    Posted 06 Jul 2010 Link to this post

    Hi Steve,

    Since you do not want to use fetch plans, you will have to use a DataContract object that wraps your persistent class and send it through the service. Then in the service method you can create a scope, read the persistent object, copy its contents to the transport object, dispose of the scope and return the transport object to the client. For more details you can have a look at our WCF N-tier demo which uses the same approach.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top