3 Answers, 1 is accepted
0
Hi Jhonattan,
Telerik Data Access offers the Detach/Attach API. The Detach method detaches an entity or enumeration of entities from the context. Just as with AsNoTracking, the resulting objects are not tracked for changes by the context.
The difference is that objects returned by the Detach method still have state. If they are later attached to the context, they will automatically introduce changes to it if they have been modified even while they have been detached.
Furthermore, the Detach method can be combined with Fetch Strategies in order to disconnect entire hierarchies of related objects from the context.
If you are interested in seeing an example of our Detach/Attach API in action, please check out the Using the Context API sample from our Samples Kit. In it, there are unit tests that demonstrate the behavior of Detach, Attach and how attached or detached objects impact the context. You will also be able to find tests demonstrating Fetch Strategies.
I hope this helps. If you have additional questions, feel free to post at our forums again.
Regards,
Kristian Nikolov
Telerik
Telerik Data Access offers the Detach/Attach API. The Detach method detaches an entity or enumeration of entities from the context. Just as with AsNoTracking, the resulting objects are not tracked for changes by the context.
The difference is that objects returned by the Detach method still have state. If they are later attached to the context, they will automatically introduce changes to it if they have been modified even while they have been detached.
Furthermore, the Detach method can be combined with Fetch Strategies in order to disconnect entire hierarchies of related objects from the context.
If you are interested in seeing an example of our Detach/Attach API in action, please check out the Using the Context API sample from our Samples Kit. In it, there are unit tests that demonstrate the behavior of Detach, Attach and how attached or detached objects impact the context. You will also be able to find tests demonstrating Fetch Strategies.
I hope this helps. If you have additional questions, feel free to post at our forums again.
Regards,
Kristian Nikolov
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
0
Jhonattan
Top achievements
Rank 2
answered on 27 Mar 2014, 07:26 PM
Hi,
This means that there was a previous process to attach query result in context, this is a penalty for perfomance, why do not make a simple way to return query result without tracking? like a micro-orm.
This means that there was a previous process to attach query result in context, this is a penalty for perfomance, why do not make a simple way to return query result without tracking? like a micro-orm.
0
Accepted
Hello Jhonattan,
The detach operation is generally fast enough to avoid negative performance impact. That being said, it will not make your queries faster as AsNoTracking can do.
In order to simplify development and reduce the amount of code which developers need to write, change tracking is automatically injected directly in your persistent classes by the Enhancer tool. This is a core functionality around which Telerik Data Access is designed. Therefore introducing a feature similar to AsNoTracking may not be currently possible.
In case you have any more questions, feel free to use our forums again.
Regards,
Kristian Nikolov
Telerik
The detach operation is generally fast enough to avoid negative performance impact. That being said, it will not make your queries faster as AsNoTracking can do.
In order to simplify development and reduce the amount of code which developers need to write, change tracking is automatically injected directly in your persistent classes by the Enhancer tool. This is a core functionality around which Telerik Data Access is designed. Therefore introducing a feature similar to AsNoTracking may not be currently possible.
In case you have any more questions, feel free to use our forums again.
Regards,
Kristian Nikolov
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.