Flatten Hierarchical Data with LINQ
Unfortunately, you haven't included enough code for me to give a proper review. Essentially what your looking for is called "eager loading." MSDN and stack overflow have some examples.

When you're building the query for entities.LOGs do something like this:

entities.LOGs.
    Include (log =&gt; log.TAG).
    Include (log =&gt; log.TAG.GROUP).
    Include (log =&gt; log.TAG.GROUP.GROUPNAMEs).
    Include (log =&gt; log.TAG.TAGNAMEs).
    Select ( /* your select here */);