dotnet: C:\Labs\Radzen\TestElsa\server\Services\CrmService.cs(500,32): error CS0121: La llamada es ambigua entre los métodos o las propiedades siguientes: 'System.Linq.AsyncEnumerable.Where<TSource>(System.Collections.Generic.IAsyncEnumerable<TSource>, System.Func<TSource, bool>)' y 'System.Linq.Queryable.Where<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.Expression<System.Func<TSource, bool>>)' [C:\Labs\Radzen\TestElsa\server\TestElsa.csproj]
I am afraid I can't reproduce such an error with a default Radzen application scaffolded from the Sample MSSQL database. Is this service created by Radzen? What is the code which generates the error?
It seems to be incompatibility by System.Interactive.Async and Entity Framework. The former defines extension methods in System.Linq which Radzen services import by default. Those conflict with the extension methods of Entity Framework.
That is to define your own extension methods in the same namespace as CrmService. The compiler should pick thtem up before the ones that cause the conflict:
namespace MyAppNamespace.Data
{
public static class QueryableExtensions
{
public static IQueryable<TEntity> Where<TEntity>(this Microsoft.EntityFrameworkCore.DbSet<TEntity> obj, System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate) where TEntity : class
{
return System.Linq.Queryable.Where(obj, predicate);
}
}
}