I got an issue, while trying to read a query plain text
Min example:
using BlazarTech.QueryableValues;
using Microsoft.EntityFrameworkCore;
var dbContext = new ApplicationContext();
var codes = new[] { 1, 2 };
var query = dbContext.Docs
.Where(x => dbContext.AsQueryableValues(codes).Contains(x.Id));
Console.WriteLine(query.ToQueryString());
public class doc
{
public int Id { get; set; }
}
public class ApplicationContext : DbContext
{
public DbSet<doc> Docs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(
"..........",
o => o.UseQueryableValues());
}
}
The example above throws an exception:
System.InvalidCastException: Unable to cast object of type 'BlazarTech.QueryableValues.DeferredInt32Values' to type 'System.String'.
Enviroment:
BlazarTech.QueryableValues 1.0.9
.net 7.0.202
ef core 7.0.4
I got an issue, while trying to read a query plain text
Min example:
The example above throws an exception:
System.InvalidCastException: Unable to cast object of type 'BlazarTech.QueryableValues.DeferredInt32Values' to type 'System.String'.
Enviroment: BlazarTech.QueryableValues 1.0.9 .net 7.0.202 ef core 7.0.4