<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx</link><description>In my last post on POCO , I mentioned the fact that there are two types of change tracking possibilities with POCO: Snapshot based Change Tracking and Notification based Change Tracking with Proxies. In this post, I would like to drill into both options</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>POCO in the Entity Framework : Part 3 ??? Change Tracking with POCO | ASP.NET MVC</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9725071</link><pubDate>Thu, 11 Jun 2009 00:29:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725071</guid><dc:creator>POCO in the Entity Framework : Part 3 ??? Change Tracking with POCO | ASP.NET MVC</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://aspmvc.co.cc/2009/06/10/poco-in-the-entity-framework-part-3-%e2%80%93-change-tracking-with-poco/"&gt;http://aspmvc.co.cc/2009/06/10/poco-in-the-entity-framework-part-3-%e2%80%93-change-tracking-with-poco/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Third post about POCO, first post about Code Only</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9725171</link><pubDate>Thu, 11 Jun 2009 01:28:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725171</guid><dc:creator>Diego Vega</dc:creator><description>&lt;p&gt;It is always busy here with all the improvements we are doing in Entity Framework to make your code work&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9725569</link><pubDate>Thu, 11 Jun 2009 05:18:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725569</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;I have a model where POCOs have all properties and methods marked as virtual and the classes have a public default constructor. They inherit from the base Entity class that overrides ToString, Equals and GetHashCode object methods and define a couple of abstract properties. The context has lazy loading and proxy change tracking enabled. The objects have a proxy type at runtime.&lt;/p&gt;
&lt;p&gt;I still have to execute DetectChanges() in order for the object state to become modified. Am I missing something?&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9725647</link><pubDate>Thu, 11 Jun 2009 06:22:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725647</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;Dmitry,&lt;/p&gt;
&lt;p&gt;In general, the answer is no. &lt;/p&gt;
&lt;p&gt;As Faisal explains, the need for the DetectChanges() API comes from the fact that Entity Framework supports plain old CLR objects that are not proxies and therefore do not notify the ObjectStateManager of property changes. &lt;/p&gt;
&lt;p&gt;To be even more explicit, you will never need to invoke DetectChanges(), as long as you know that the totality of the entity instances that are being tracked are POCO Proxy instances.&lt;/p&gt;
&lt;p&gt;Entity Framework can track changes on graphs made of all the different POCO “kinds” below: &lt;/p&gt;
&lt;p&gt;1.	POCO Proxies&lt;/p&gt;
&lt;p&gt;2.	Non-Proxy POCOs &lt;/p&gt;
&lt;p&gt;3.	POCOs that conform with the Proxy requirements but are actually Non-Proxy instances &lt;/p&gt;
&lt;p&gt;Even if your class complies with all the requirement for proxies, you only get #1 when you either&lt;/p&gt;
&lt;p&gt;a.	Retrieve entities from a query&lt;/p&gt;
&lt;p&gt;b.	Invoke the new ObjectContext.CreateObject&amp;lt;T&amp;gt;() API.&lt;/p&gt;
&lt;p&gt;Otherwise, you end up with #3. &lt;/p&gt;
&lt;p&gt;Now, only when the graph of objects you are tracking contains instances of #2 or #3, there are changes that the knowledge in ObjectStateManager won’t stay in sync with the latest changes in the graph. &lt;/p&gt;
&lt;p&gt;Then, the behavior of the APIs that Faisal lists in this post depends on the information on the ObjectStateManager, and therefore, there are chances that you might get unexpected results unless you invoke DetectChanges() *before* invoking those APIs. &lt;/p&gt;
&lt;p&gt;There are many cases however, in which even if you don’t invoke DetectChanges, things are going to be just fine. This is the case, for instance, if the part of the graph the method needs to reason about is different from the part of the graph previous steps in the program have manipulated.&lt;/p&gt;
&lt;p&gt;Finally, SaveChanges() implicitly invokes DetectChanges(). As a result, invoking DetectChanges() explicitly is unnecessary in many simple cases.&lt;/p&gt;
&lt;p&gt;Hope this answers the question,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9725695</link><pubDate>Thu, 11 Jun 2009 06:50:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725695</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Diego,&lt;/p&gt;
&lt;p&gt;My issue is I do not seem to be getting POCO proxies. I do get them from a query. I believe I tested this behavior by using GetObjectByKey method as well as LINQ to Entity queries.&lt;/p&gt;
&lt;p&gt;I implement transaction auditing in the SavingChanges event handler and it would be nice to know the object state before calling DetectChanges/SaveChanges.&lt;/p&gt;
&lt;p&gt;I ended up calling DetectChanges in the beginning of the event handler and then call the overload of SaveChanges that does not invoke DetectChanges. This way I don't have to manually track objects created with the &amp;quot;new&amp;quot; operator.&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9725755</link><pubDate>Thu, 11 Jun 2009 07:17:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725755</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;Hello Dmitry,&lt;/p&gt;
&lt;p&gt;Creating a class that is “proxy-able” doesn’t per se provide you proxies. If you use simple instance construction like in&lt;/p&gt;
&lt;p&gt;var p = new Product();&lt;/p&gt;
&lt;p&gt;… you will get non-proxies. If you need free proxy instances, you have to do something like this:&lt;/p&gt;
&lt;p&gt;Var p = context.CreateObject&amp;lt;Product&amp;gt;();&lt;/p&gt;
&lt;p&gt;If you are still getting non-proxies after doing this, a common cause is that the collection navigation properties in the type are not of type ICollection&amp;lt;T&amp;gt;. This is also a requirement for change tracking proxies.&lt;/p&gt;
&lt;p&gt;Regarding your second point, in SaveChanges, by default, DetectChanges is invoked right before raising the SavingChanges event, so you shouldn't need to call DetectChanges yourself.&lt;/p&gt;
&lt;p&gt;If for some reason you want to inspect the state of the ObjectStateManager before DetectChanges (just becasue I am not sure I understood the question correctly), I see two easy alternatives:&lt;/p&gt;
&lt;p&gt;1. Override SaveChanges and do the inspection before calling base.SaveChanges&lt;/p&gt;
&lt;p&gt;2. Invoke SaveChanges with ~SaveOptions.DetectChangesBeforeSave&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>ADO.NET team blog : POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9726182</link><pubDate>Thu, 11 Jun 2009 11:26:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9726182</guid><dc:creator>DotNetShoutout</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from DotNetShoutout&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9726787</link><pubDate>Thu, 11 Jun 2009 18:45:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9726787</guid><dc:creator>Guilgamesh</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;I think the new functionality in EF 4.0 addresses very well some on the limitations of the previous version.&lt;/p&gt;
&lt;p&gt;I have some questions, and I hope someone can help me find their answers. I am working on a 3-tiered application, and I would like to use ChangeTracking with POCOs. My questions are:&lt;/p&gt;
&lt;p&gt;1. Can the Proxies be serialized by WCF?&lt;/p&gt;
&lt;p&gt;2. If Proxies can be serialize, how can it be done? &lt;/p&gt;
&lt;p&gt;3. What type should I specify in the signature of the WCF methods?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Guilgamesh&lt;/p&gt;
</description></item><item><title>Daily tech links for .net and related technologies - June 11, 2009</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9726958</link><pubDate>Thu, 11 Jun 2009 19:23:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9726958</guid><dc:creator>Sanjeev Agarwal</dc:creator><description>&lt;p&gt;Daily tech links for .net and related technologies - June 11, 2009 Web Development Opinionated Input&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9727631</link><pubDate>Thu, 11 Jun 2009 23:19:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9727631</guid><dc:creator>Guilgamesh</dc:creator><description>&lt;p&gt;Hello Sanjeev,&lt;/p&gt;
&lt;p&gt;I don't know how to interpret this...&lt;/p&gt;
&lt;p&gt;Guilgamesh&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9727825</link><pubDate>Fri, 12 Jun 2009 00:15:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9727825</guid><dc:creator>Pagal</dc:creator><description>&lt;p&gt;Is it possible to get the associated ObjectContext from an EntityObject.&lt;/p&gt;
&lt;p&gt;Will the next release (.NET 4??) of Entity Framework provide this in a more fundamental fashion.&lt;/p&gt;
&lt;p&gt;Maybe as a property like EntityObject.ObjectContext?&lt;/p&gt;
</description></item><item><title>ADO.NET team blog : POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9728782</link><pubDate>Fri, 12 Jun 2009 05:25:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9728782</guid><dc:creator>9eFish</dc:creator><description>&lt;p&gt;9efish.感谢你的文章 - Trackback from 9eFish&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9729646</link><pubDate>Fri, 12 Jun 2009 07:17:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9729646</guid><dc:creator>shawn</dc:creator><description>&lt;p&gt;I agree with Pagal, having access to the active ObjectContext from within an EntityObject would be extremely helpful.&lt;/p&gt;
</description></item><item><title>Using Repository and Unit of Work patterns with Entity Framework 4.0</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9763352</link><pubDate>Wed, 17 Jun 2009 02:08:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9763352</guid><dc:creator>ADO.NET team blog</dc:creator><description>&lt;p&gt;If you have been watching this blog, you know that I have been discussing the various aspects of POCO&lt;/p&gt;
</description></item><item><title>Using Repository and Unit of Work patterns with Entity Framework 4.0</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9772872</link><pubDate>Thu, 18 Jun 2009 08:16:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9772872</guid><dc:creator>VS2010学习</dc:creator><description>&lt;p&gt;If you have been watching this blog, you know that I have been discussing the various aspects of POCO&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9776826</link><pubDate>Thu, 18 Jun 2009 20:38:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9776826</guid><dc:creator>Sly</dc:creator><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;I like to define interfaces for my entities (IProduct and ICategory). That allows me for easy decoration, replacement, proxying, mocking. &lt;/p&gt;
&lt;p&gt;Do you support working with interfaces instead of concrete classes? This way you support lazy-loading and change tracking without having to use virtuals.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9827031</link><pubDate>Thu, 09 Jul 2009 19:05:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9827031</guid><dc:creator>Jeff</dc:creator><description>&lt;p&gt;@Guilgamesh&lt;/p&gt;
&lt;p&gt;Proxies cannot be directly serialized with WCF serialization, but there are ways to serialize these entities where the proxy is transformed into a &amp;quot;pure poco&amp;quot; (non-proxy). &amp;nbsp;You wouldn't necessarily want to serialize the proxies with WCF because then the proxy definition would have to be part of your OperationContract. This would tightly couple your client code with your persistence layer and you'd loose some of the goodness you got from using POCO in the first place. What we will have is an attribute you can add to your operation contract that uses a new WCF feature called a DataContractResolver. This attribute will signal to WCF to serialize proxy instances as their base, non-proxy DataContract.&lt;/p&gt;
&lt;p&gt;When using pure-POCO classes on the client, you will loose the ability to do change tracking. If your goal is: how do I do change tracking of POCOs accross tiers, I'd look into a solution that uses self-tracking entities, which are still POCO in that they do not have a dependency on the persistence framework, but do have code inside them that knows how to track and report changes. There are other blog posts about self-tracking entity support with the Entity Framework on this blog.&lt;/p&gt;
&lt;p&gt;Jeff&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9827035</link><pubDate>Thu, 09 Jul 2009 19:07:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9827035</guid><dc:creator>Jeff</dc:creator><description>&lt;p&gt;@Sly&lt;/p&gt;
&lt;p&gt;We do not support mapping to interfaces yet. This request is coming up more and more frequently, though as it does allow some interesting patterns (and proxying). &lt;/p&gt;
&lt;p&gt;If we supported interfaces and you wanted EF to do lazy loading/change tracking for you, would your assumption be that we just generate our own implementation of the entire class? How would you inject business logic into the class in this case?&lt;/p&gt;
&lt;p&gt;Thanks for the note!&lt;/p&gt;
&lt;p&gt;Jeff&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9827136</link><pubDate>Thu, 09 Jul 2009 19:53:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9827136</guid><dc:creator>Sly</dc:creator><description>&lt;p&gt;@ Jeff: Hi, thanks for your answer. &lt;/p&gt;
&lt;p&gt;I would code a concrete Product class with all my business logic. The Product class would implement the IProduct interface that I would also define. &lt;/p&gt;
&lt;p&gt;I would expect that you decorate (GoF decorator pattern) the IProduct interface to add lazy loading/change tracking. Thus, your code would end-up forwarding all calls to my real product implementation where my business logic is. But you would not know about the Product class, just the IProduct interface.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Sly&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9840064</link><pubDate>Sun, 19 Jul 2009 17:44:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9840064</guid><dc:creator>radyo dinle</dc:creator><description>&lt;p&gt;I agree with Pagal, having access to the active ObjectContext from within an EntityObject would be extremely helpful.&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9926826</link><pubDate>Sat, 21 Nov 2009 22:16:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9926826</guid><dc:creator>divega</dc:creator><description>&lt;p&gt;@Dmitry, just to clarify: when I previously said that DetectChanges is invoked immediately before the SavingChanges event is raised I actually got it upside down. It happens after, to make sure it captures any change you do in your graph inside the event handler. If you need to use the ObjectStateManager API to iterat through entities, you should invoke DetectChanges yourself inside the SavingChanges handler as you mentioned. &lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx#9928983</link><pubDate>Thu, 26 Nov 2009 07:49:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9928983</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;Does anybody know how to save an entity object in different context? &amp;nbsp;Here is my code.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NorthwindPocoDatabaseTests t = new NorthwindPocoDatabaseTests();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Product product = t.getProduct(&amp;quot;Chai&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;t.Finish();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;t.Start();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;product.UnitPrice = 99;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;t.saveProduct(product);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;t.Finish();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;....&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public bool saveProduct(Product p)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;context.Products.Attach(p);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;context.SaveChanges();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
</description></item></channel></rss>