title: Remove certain properties from object upon query EF Core 2.1
body: <p>I'm trying to null or remove the ID entirely of all the queried IsoDataTables before returning them to frontend. The idea is that it should behave (in this case) as a template and I don't want it returning the id's back to me, nor do I want them to be removed in the frontend.</p>
  
  <pre><code>var applicationType = await _context.ApplicationType
                                      .Include(m =&gt; m.IsoTableData)
                                      .AsNoTracking()
                                      .FirstOrDefaultAsync(m =&gt; m.Id == id);
  
  if (applicationType == null)
  {
      return NotFound();
  }
  
  if (applicationType.IsoTableData != null)
  {
      foreach (IsoTableData isoTableData in applicationType.IsoTableData)
      {
          // error since it a not nullable primary key
          isoTableData.Id = null;
      }
  }
  
  return Ok(applicationType);
  </code></pre>
  
  <p>I have found a workaround in which I duplicate the objects and return them (without saving to DB) but I'm looking for a more elegant solution.</p>