title: CS0246 C# The type or namespace name 'ForeignKeyAttribute' could not be found (are you missing a using directive or an assembly reference?)
body: <p>I am learning using Entity Framework <strong>Code First</strong> to create my database
  via <strong>Azure</strong> Mobile App Service</p>
  
  <p>But I got an error , it looks like </p>
  
  <p><a href="https://i.stack.imgur.com/YDfZf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YDfZf.png" alt="enter image description here"></a></p>
  
  <pre><code>CS0246 C# The type or namespace name 'ForeignKeyAttribute' 
  could not be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p>And I've already used <strong>System.ComponentModel.DataAnnotations.Schema;</strong>
  but it seems not to work .</p>
  
  <p>How can I solve this ?</p>
  
  <p>=====================================================</p>
  
  <p><strong>Finally , I solved it referring to this  !!
  <a href="https://stackoverflow.com/questions/10174420/why-cant-i-reference-system-componentmodel-dataannotations">Why can&#39;t I reference System.ComponentModel.DataAnnotations?</a></strong></p>