title: How to combine the results of two DTOs in C# into one list of one type
body: <p>I have a C# web app that is currently pulling data from two databases. One of the databases has a table called resources that contains employee details and the other contains a view to details collected in a company web app.</p>
  
  <p>I need to create a list of each 'active' employee that also lists their web app history. </p>
  
  <p>I want to return a List of type ResourceDTO with the results of the WebAppDTO in another list per user.</p>
  
  <p>Ideally I will be able to manipulate this in Angular, Create a table listing employee names and in the next column "tally" up how many times they have participated. Each of the tally's will be a link that then uses the webappID to display the details for that employee.</p>
  
  <pre><code>C# Question for Satckoverflow
  
  //Web Api
  
  public List&lt;ResourceDTO&gt; GetWebAppLeaders()
          {
              List&lt;ResourceDTO&gt; webappLeaders = new List&lt;ResourceDTO&gt;();
  
              //Linq to get a list of employees that take part of Web App
              var people = from x in _staffCtx.Resources
                           where (x.Active.HasValue &amp;&amp; x.Active.Value &amp;&amp; x.ManagerID.HasValue &amp;&amp; x.FirstName.Length &gt; 0)
                           select new ResourceDTO()
                           {
                               FirstName = x.FirstName,
                               LastName = x.LastName,
                               ResourceID = x.ResourceID,
                           };
  
              webappLeaders = people.ToList();
  
              //currently loops through each member of staff in list above and grabs their web app history.
              foreach (var person in people)
              {
                  int personID = person.ResourceID;
  
                  var webappHistory = from u in _webappCtx.CompanyWebAppViews
                                      where (u.PupilID == personID || u.TeacherID == personID)
                                      select new WebAppDTO()
                                      {
                                          webappDate = u.webappDate.ToString(),
                                          webappID = u.ID,
                                      };
                  webappHistory.ToList();
              }
  
              //webappLeaders.ToList();
  
              // successfully returns list of Employees as filtered out by where clause.
              return webappLeaders;
  
          }
  
  '//ResourceDTO.cs
  
   public class ResourceDTO
      {
          public int ResourceID { get; set; }
          public string Email { get; set; }
          public string FirstName { get; set; }
          public string LastName { get; set; }
          public string JobTitle { get; set; }
          public string ExtensionNumber { get; set; }
          public string MobileNumber { get; set; }
          public string MobileSpeedDial { get; set; }
          public string IMAddress { get; set; }
          public int? ManagerID { get; set; }
          public string ManagerName { get; set; }
          public string DepartmentType { get; set; }
  
          // Other field you may need
  
          //web app specific
          public List&lt;WWebAppDTO&gt; webappPupil { get; set; }
  
          public List&lt;WebAppsDTO&gt; webappTeacher { get; set; }
  
      }
  
  //WebAppDTO.cs
  
      public class WebAppDTO
      {
          public int webappID { get; set; }
          public string pupilName { get; set; }
          public string teacherName { get; set; }
  
          public string webappDate { get; set; }
  
          public string pupilLearnt { get; set; }
  
          public string pupilComments { get; set; }
  
          public string teacherComments { get; set; }
  
      }
  </code></pre>
  
  <p>Apologies in advance if I have miss understood some vital concepts, C# MVC is new to me.</p>
  
  <p>I would greatly appreciate some example code.</p>
  
  <p>Thanks.</p>