I'm trying convert my application with MS SQL Server 2014 database to SQlite. This query works well on SQL Server, but with SQLite, i encounter "APPLY JOINS is not supported" error.
this error exist only with *select ( & include) query.
Query:
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;
}
If i comment this line: .Include(s => s.Cdts.Select(r => r.CdtFiches))
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;
}
It works well.
If i comment another line: .Include(s => s.Cdts.Select(r => r.Sessions))
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;
}
it works well too.
Are there any specific rules to sqlite select query?