This is a migrated thread and some comments may be shown as answers.

Converting an Object to InMemory...

1 Answer 30 Views
LINQ (LINQ specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 02 Jul 2010, 06:36 PM
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.

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 06 Jul 2010, 08:45 AM
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.

Regards,
Alexander
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
Tags
LINQ (LINQ specific questions)
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Alexander
Telerik team
Share this question
or