小编Mar*_*arc的帖子

SQLite 查询中“不支持应用联接”

我正在尝试将我的应用程序与 MS SQL Server 2014 数据库转换为 SQlite。该查询在 SQL Server 上运行良好,但使用 SQLite 时,我遇到“不支持 APPLY JOINS”错误。

此错误仅存在于 *select (& include) 查询中。

询问:

        public static IList<Projet> GetListByClientWithDetails(long IdClient)
    {
        IList<Projet> resultList = null;

        using (FITSEntities db_context = new FITSEntities())
        {
            resultList = db_context.Projet.Where(s => s.IdClient == IdClient)
                .Include(s => s.Cdts.Select(r => r.CdtFiches))
                .Include(s => s.Cdts.Select(r => r.Sessions))
                .Include(s => s.Fiches.Select(r => r.FicheVersions))
                .ToList();
        }
        return resultList;
    }
Run Code Online (Sandbox Code Playgroud)

如果我评论这一行:.Include(s => s.Cdts.Select(r => r.CdtFiches))

        public static IList<Projet> GetListByClientWithDetails(long IdClient)
    {
        IList<Projet> resultList = null; …
Run Code Online (Sandbox Code Playgroud)

c# sql-server sqlite select include

6
推荐指数
1
解决办法
1439
查看次数

标签 统计

c# ×1

include ×1

select ×1

sql-server ×1

sqlite ×1