I made this link:
var resultado = (
from pdv in db.T_PDV
join tarefa in db.T_TarefaParceiro on pdv.CNPJ equals (tarefa.CNPJ) into _trf
from g1 in _trf.DefaultIfEmpty()
join parceiro in db.T_OsParceiro on tarefa.IDTarefaParceiro equals (parceiro.IDTarefaParceiro) into _pcr
from g2 in _pcr.DefaultIfEmpty()
join acao in db.T_Acao on tarefa.IDAcao equals (acao.IDAcao) into _acao
from g3 in _acao.DefaultIfEmpty()
join proxima in db.T_ProximaAcao on acao.IDAcao equals (proxima.IDAcao) into _pxm
from g4 in _pxm.DefaultIfEmpty()
join info in db.T_InfoClientePdv on pdv.CNPJ equals (info.CNPJ) into _info
from g5 in _info.DefaultIfEmpty()
join cliente in db.T_Cliente on info.IDCliente equals (cliente.IDCliente) into _clie
from g6 in _clie.DefaultIfEmpty()
select new
{
pdv.CNPJ,
pdv.DataCadastro,
cliente.NomeFantasia,
acao.Acao,
proxima.ProximaAcao,
parceiro.NumOs,
parceiro.DataVisita,
parceiro.DataAgendamento
}).ToList();
On this line, line is giving this error:
join parceiro in db.T_OsParceiro on tarefa.IDTarefaParceiro equals (parceiro.IDTarefaParceiro) into _pcr
This is the error you are giving. I know the task table is already in left
. How do I get her to enter another left
?
The name 'task' is not in scope on the left side of 'equals'. Consider swapping the expressions on either side of 'equals'.