SQL查询:
SELECT
'ETS' AS dataSource,
ES.ShowId,
ES.Title,
EE.EpisodeId,
EE.Title AS EpisodeTitle,
ELG.GenreDescription
AS Genre,
ELST.ShowTypeDescription,
dbo.TVData_UDF_ETS_DirectorString(ES.ShowId) AS DirectorName,
ES.ReleaseYear,
EE.SeasonEpisode
FROM dbo.ETS_Shows AS ES
LEFT OUTER JOIN dbo.ETS_Episodes AS EE
ON ES.ShowId = EE.ShowId
LEFT OUTER JOIN dbo.ETS_LKP_Genres AS ELG
ON ES.GenreCode = ELG.GenreCode
LEFT OUTER JOIN dbo.ETS_LKP_ShowTypes AS ELST
ON ES.ShowTypeCode = ELST.ShowTypeCode
我正在尝试这样做,但它没有返回正确的数据:
var data = db.ETS_Shows.Include("ETS_Episodes").Include("ETS_LKP_Genres").Include("ETS_LKP_ShowTypes").ToList();
谁能帮我一把?