TEntity cannot convert to SQL
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Cannot convert Linq to SQL
ERROR im getting : "Local sequence cannot be used in LINQ to SQL implementations of query operators except the Contains operator.".
Read more >Can't convert a WKT with a Z value into a SQL Geometry ...
So it looks like i was able to get around my issue by replacing any occurance i had of .AsText(). to .ToWKT().
Read more >Why does SQL Server say it can't convert varchar to numeric?
A conversion error will occur at run time when an attempt is made to convert the sales.pid value 'Colgate' value to numeric(9) to...
Read more >SAP DBTech JDBC: Cannot convert SQL type TABLE to ...
My Procedure is something like : PROCEDURE SAMPLE( IN EMP_DATA COM_SAP_EMP, IN ID INTEGER, IN AGE INTEGER, OUT RESULT TABLE("ABC" ...
Read more >How to convert sql to EF linq query
I am converting a sql query with 2 table Joins to an entity Framework linq query in a .net6 application. The sql query...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Use Expression, we cannot get this information without ExpressionTree
Well, this one should work, as you have shown previously. Also added dynamic variant