linq2db: TEntity cannot convert to SQL
Describe your issue.
Hi, i want to update database object full dynamically but linq2db cannot create sql from TEntitiy
here is my function
public async Task UpdateEntity(Expression<Func<TEntity, bool>> predicate, TEntity entity)
{
await Context.GetTable<TEntity>().Where(predicate).UpdateAsync(x => entity);
}
Cann someone help me to fix this issue?
Exception message:
Stack trace: LinqToDB.Linq.LinqException : 'value(AlfaTools.Interface.GDI.Data.GDIRepository`1+<>c__DisplayClass12_0[AlfaTools.Interface.GDI.KUNDEN]).entity' cannot be converted to SQL.
Environment details
linq2db version: 3.3.0 Database Server: Windows Server 2012 Database Provider: Firebird 3.0 Operating system: Windows .NET Framework: 5.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (8 by maintainers)
Use Expression, we cannot get this information without ExpressionTree
Well, this one should work, as you have shown previously. Also added dynamic variant
Let me check in a hour.