question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include this looping infinite.

Repository

var result = _db.Venda
                .Include(x => x.Pdv)
                .Where(x => x.IdEvento == idEvento && x.Status != "rejected")
                .AsNoTracking().ToList();

            return result;

Return

[
    {
        "IdVenda": 1,
        "IdCliente": 0,
        "IdPagamento": null,
        "Data": "2018-02-25T22:28:23.1089459",
        "Total": 150,
        "Pdv": {
            "IdPdv": 2,
            "CodigoPdv": "2051",
            "DataAtualizado": "2018-02-27T19:09:49.819312",
            "Venda": [
                {
                    "IdVenda": 2,
                    "IdCliente": 0,
                    "IdPagamento": null,
                    "Data": "2018-02-25T22:31:20.5138951",
                    "Total": 70,
                }...

How to limit includes a one level?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ralmsdevelopercommented, Mar 23, 2018
0reactions
deniscesarcommented, Mar 23, 2018

I’ll try to use viewmodel

The include should only be on the first level. If it was called theninclude loads for Venda

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Infinite compilation loop with #include - c++
This kind of loop dependency can occur with more than two files, just for the sake of simplicity I listed only two. What...
Read more >
Infinite doesn't include everything
The idea of infinity is hard to comprehend, so it makes sense to just include everything in there, but you can actually have...
Read more >
Infinity - Wikipedia
Infinity is something which is boundless, endless, or larger than any natural number. ... to work with infinite series and what some mathematicians...
Read more >
Does infinity include every possible number?
However, you are wrong in saying that infinity includes everything but 5. Infinity is an idea, not a group or a list of...
Read more >
Like a Dragon Gaiden will include an Infinite Wealth demo ...
Like a Dragon Gaiden will include an Infinite Wealth demo, new overview trailer reveals. The Man Who Erased His Name will come with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found