Home > Software design >  Linq2db.EntityFramework dependency is giving error
Linq2db.EntityFramework dependency is giving error

Time:04-09

var query = 
from s in context.AssetStatusRecord.ToLinqToDB()  // switch LINQ Provider
where s.Speed != 0 
    && s.CreationUtcTime <= endTime
    && s.CreationUtcTime >= startTime
    && s.AssetId == assetId
orderby s.CreationUtcTime
select new 
{
    s.CreationUtcTime,  
    s.Speed,
    diff = s.CreationUtcTime - 
        Sql.Ext.Lag(s.CreationUtcTime)
            .Over()
            .OrderBy(s => s.CreationUtcTime)
            .ToValue()
};

var result = query.ToList();

I am using this query but getting an error on ToLinqToDB() Line . I have installed linq.EntityFramework linq2db.EntityFrameworkCore 3.7.0 but still cannot include this class dependency. My Microsoft.EntityFrameworkCore.Relational version is 3.1.6

CodePudding user response:

Released linq2db.EntityFrameworkCore 3.18.0, which works with EF Core 3.1.6

  • Related