title: Getting error when using EntityState.Modified
body: <p>I'm following <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application" rel="nofollow">this</a> article to implement repository pattern in a web API project. When implementing the update method in the repository I've followed the example provided, using:</p>
  
  <pre><code>context.Entry&lt;Item&gt;(item).State = System.Data.EntityState.Modified;
  </code></pre>
  
  <p>For some reason though I'm getting the following build error, </p>
  
  <blockquote>
    <p>an instance of type system.data.entitystate can not be assigned to a
    variable of type system.data.entity.entitystate</p>
  </blockquote>
  
  <p>My code is the same as in the example other than the fact I am using a different entity to the one used in the example. Any ideas why I might be getting this error? I'm using EF 6.02.</p>
  
  <p>Cheers</p>