I honestly did not think that this would be difficult to accomplish but I'm trying to figure out how to take an entity linq query and insert it into a compiled query command but for the life of me, I cannot figure it out. I've search high and low and there's a ton of stuff talking about .net Core, but I'm not using .net Core.
Here's an example of my code that simply will not work.
var compiledQuery = CompiledQuery.Compile<dbEntities, DateTime, IQueryable<Transactions>> (((db,dateStamp) =>
db.Transactions.Where(x =>
x.Ledger == 6 && x.SubId != null && x.Dated < DbFunctions.AddDays(dateStamp, 1)));