Asp.net - read data from database and save in entitiyes , BUT in which datatype?
<p>I have 3 tables:</p>

<pre><code>1   User (USERID, Name, Age, Phone Number, FK_VennerID)
2:  Friends (VENNERID, name, age, gender, FK_LokationID)
3:  Location (LOKATIONID, Zip code, city name)
</code></pre>

<p>Based on the 3 tables, i have maked the Entity Model like this​ in my asp.net program:</p>

<pre><code>public class User
  {
      public int USERID {get; set;}
      public string Name {get; set;}
      public int Age {get; set;}
      public int Phone Number {get; set;}

      public virtual ICollection &lt;Venner&gt; Friends {get; set;}
  }

  public class Friends
  {
      public int VENNERID {get; set;}
      public string Name {get; set;}
      public int Age {get; set;}
      public int LokationID {get; set;}

      public virtual User User {get; set;}
      public virtual Location Location {get; set;}
  }

  public class Location
  {
      public int LokationID {get; set;}
      public int Zip {get; set;}
      public string Town {get; set;}

      public virtual ICollection &lt;Venner&gt; Friends {get; set;}
  }
</code></pre>

<p>Let us now assume that I have in my database defined a sql stored procedure, which takes 1 input parameter and gives me the following data from 3 tables:</p>

<pre><code>User.name, 
Friends.name, 
Friends.age, 
lokation.Zip, 
Lokation.Town
</code></pre>

<p>Soo How do I save so data from sql SPOC in Entities objects.</p>

<p>If data were only of ONE type I could have done this:</p>

<pre><code>User user = new User ();

user.navne = datafrabasen;
user.xx = datafrabasen;
</code></pre>

<p>But now we have mixed data from the base, which has both user class Friend class and class location to do ..</p>

<p>I want to save data from the database into a list ... which can be called from font layer!</p>

<pre><code>Return to List &lt;Type&gt; xxxx ();
</code></pre>
