Note that there are some explanatory texts on larger screens.

plurals
  1. POLeft Join Entity Framework
    primarykey
    data
    text
    <p>I am going to trash Entity Framework 5! I have spent two days to find solution from web but found nothing!</p> <p>I tried a simple left join from table Artworks and EndValidities with the input IDFondazione as 2620</p> <pre><code>var query = from art in db.Artworks join endVal in db.EndValidities.DefaultIfEmpty() on art.ID_Dtsl equals endVal.IDdtsl where art.ID_Cdgs == IDFondazione select new SchedaOpera() { Cdscheda = art.Cdscheda, Confirmed = art.FGconfermata, DSimmagine = art.DSimmgine, Dtsf = art.Dtsf, Dtsi = art.Dtsi, Dtsl = endVal != null ? endVal.Dtsl : "", Iscr = art.Iscr, Misa = art.Misa, Ldcn = art.Ldcn, Ldcs = art.Ldcs, Misd = art.Misd, Misl = art.Misl, Misn = art.Misn, Misp = art.Misp, Miss = art.Miss, Pvcc = art.Pvcc, Pvcp = art.Pvcp, Sgtt = art.Sgtt }; </code></pre> <p>The marvellous entity framework continues to produce</p> <pre><code>SELECT [Extent1].[ID_Dtsl] AS [ID_Dtsl], [Extent1].[CDscheda] AS [CDscheda], [Extent1].[FGconfermata] AS [FGconfermata], [Extent1].[DSimmagine] AS [DSimmagine], [Extent1].[DS_DTSF] AS [DS_DTSF], [Extent1].[DS_DTSI] AS [DS_DTSI], CASE WHEN (cast(1 as bit) &lt;&gt; cast(0 as bit)) THEN [Extent2].[DSdtsl] ELSE N'_' END AS [C1], [Extent1].[DS_ISCR] AS [DS_ISCR], [Extent1].[NR_MISA] AS [NR_MISA], [Extent1].[DS_LDCN] AS [DS_LDCN], [Extent1].[DS_LDCS] AS [DS_LDCS], [Extent1].[NR_MISD] AS [NR_MISD], [Extent1].[NR_MISL] AS [NR_MISL], [Extent1].[NR_MISN] AS [NR_MISN], [Extent1].[NR_MISP] AS [NR_MISP], [Extent1].[NR_MISS] AS [NR_MISS], [Extent1].[FGpubblicata] AS [FGpubblicata], [Extent1].[DS_PVCC] AS [DS_PVCC], [Extent1].[DS_PVCP] AS [DS_PVCP], [Extent1].[DS_SGTT] AS [DS_SGTT] FROM [dbo].[TPD_OPERE] AS [Extent1] INNER JOIN [dbo].[TSA_DTSL] AS [Extent2] ON [Extent1].[ID_Dtsl] = [Extent2].[IDdtsl] WHERE [Extent1].[CD_CDGS] = '2620' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload