I'm trying to make a "LEFT JOIN".
However, only when I have information "in both tables" does the command return something.
Bellow my function
 public IList<ClientWorkFlowReadModel> GetWorkFlow(int idClient)
                {
                    try
                    {
                        using (GvisaContext db = new GvisaContext())
                        {
                            //Disable de proxy tracking for prevent error in json convertion
                            db.Configuration.ProxyCreationEnabled = false;
                            var clientServiceWorkFlows = db.ServicesWorkFlow
                               .Join(db.ClientsServicesWorkFlow, 
                                      swf => swf.IdServiceWorkFlow, 
                                      cswf => cswf.IdServiceWorkFlow, 
                                      (swf, cswf) =>
                               new { swf, cswf })
                               .Select(x => new ClientWorkFlowReadModel {
                                   Title = x.swf.Title,
                                   IdClient = x.cswf.IdClient,
                                   IdService = x.swf.IdService,
                                   IdClientServiceWorkFlow = x.cswf.IdClientServiceWorkFlow,
                                   Description = x.swf.Description,
                                   Active = x.swf.Active,
                                   DateUpdate = x.cswf.DateUpdate
                                  }
                               ).Where(y => y.IdClient == idClient).ToList();
                            return clientServiceWorkFlows;
                        }
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
I need to do this:
SELECT * FROM dbo.Clients z
INNER JOIN dbo.ClientsServices y on y.idClient=z.idClient
INNER JOIN dbo.ServicesWorkFlow a on a.IdService=y.IdService
LEFT JOIN ClientsServicesWorkFlow b on b.IdClientServiceWorkFlow=a.IdServiceWorkFlow
WHERE z.IdClient=3
thanks!!!
 
     
     
    