title: An exception of type 'System.NotSupportedException' occurred in mscorlib.dll but was not handled in user code
body: <p>please help me . 
  I have this error:</p>
  
  <p><em>An exception of type 'System.NotSupportedException' occurred in mscorlib.dll but was not handled in user code
  Additional information: The specified type member 'WebsiteUsersPersoana_Persoana_Id_wu' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.</em></p>
  
  <p>This is my edmx:</p>
  
  <p><a href="https://i.stack.imgur.com/6Wq9N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Wq9N.png" alt="enter image description here"></a></p>
  
  <p>And this is my database:</p>
  
  <p><a href="https://i.stack.imgur.com/y2OCb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2OCb.png" alt="enter image description here"></a></p>
  
  <p>My problem is this: When admin tries to delete one website user, he must recieve a message with an alert=> You must to delete the person first. </p>
  
  <p>He needs to know which person, so I need LINQ. </p>
  
  <p>Here is the code:</p>
  
  <pre><code> catch (Exception ex)
              {
                  var idPers = e.Values[0];
  
  
                  var IdPers = Convert.ToInt16(idPers);
  
                  var x = (from p in db.PersoanaSet
                           where p.WebsiteUsersPersoana_Persoana_Id_wu == IdPers
                           select p
                               ).ToList().FirstOrDefault();
  
  
                  litMsg.Text = "You need to delete this person:  "  +" " +  " "  + ex.Message;
              }
  </code></pre>
  
  <p>Thank you in advance</p>