Inner join core.net

0

I need to do an inner join to load into a table, if it were without inner join I would do it this way:

PessoasServicos = await _context.PessoasServicos
            .Include(m => m.PlanosServicos).Where(m => m.PessoaId == id)
            .ToListAsync();

Here's how the table code looks:

<table class="table table-condensed table-hover">
  <tr>
    <th>
      @Html.DisplayNameFor(m => m.PessoasServicos.FirstOrDefault().Descricao)
    </th>
    <th>
      @Html.DisplayNameFor(m => m.PessoasServicos.FirstOrDefault().Tipo)
    </th>
    <th>
      @Html.DisplayNameFor(m => m.PessoasServicos.FirstOrDefault().Valor)
    </th>
    <th></th>
  </tr>
  @foreach (var item in Model.PessoasServicos) {
  <tr>
    <th>
      @Html.DisplayFor(m => item.Descricao)
    </th>
    <th>
      @Html.DisplayFor(m => item.Tipo)
    </th>
    <th>
      @Html.DisplayFor(m => item.Valor)
    </th>
    <td>
      <a asp-page="Edit" asp-route-id="@item.Id" class="btn btn-sm btn-success">Editar</a>
      <button asp-page-handler="Delete" asp-route-id="@item.Id" class="btn btn-danger btn-sm">Excluir</button>
    </td>
  </tr>

  }
</table>

How can I do the inner join? Some example, or something that helps me, I appreciate it.

    
asked by anonymous 02.07.2018 / 19:38

0 answers