Closed schuettecarsten closed 4 years ago
Hello @schuettecarsten ,
Could you provide a full example of this issue?
We tried something similar but we don't get the error:
var products = context.Products.Where(x => x.ColumnInt > 2).Include(x => x.Category).ToList();
You can send it to: info@zzzprojects.com if you need to keep the source private
Best Regards,
Jonathan
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
Hello @schuettecarsten,
Since our last conversation, we haven't heard from you.
Could you provide a full example of this issue on our email: info@zzzprojects.com
Looking forward to hearing from you,
Jon
Hello @schuettecarsten
A quick reminder that we are here to assist you.
Don't hesitate to provide a full example of this issue to our email: info@zzzprojects.com
Looking forward to hearing from you,
Jon
Problem was caused by our own code. We used the following method to initiate a LINQ query, which works fine with EF6, but fails with EFClassic:
/// <summary>
/// Returns an <see cref="T:System.Linq.IQueryable`1" /> that allows to query the database.
/// </summary>
public override IQueryable<TEntity> Query<TEntity>()
{
ObjectContext objectContext = ((IObjectContextAdapter)this.dbContext).ObjectContext;
ObjectSet<TEntity> query = objectContext.CreateObjectSet<TEntity>();
query.MergeOption = this.mergeOption;
return query;
}
Meanwhile, I moved back to EF6 with EF+ because of too many side effects.
The following code leads to an InvalidCastException exception:
Exception details: