Hey, In my application, I have a piece of code similar to the following:
public Task UpdateSomeFieldsAsync(int entityId)
{
using var db = await dbConnectionFactory.OpenDbConnectionAsync();
await db.UpdateAddAsync(
() => new Entity1 { Count = 5 }, where: p => p.Id == entityId);
await db.UpdateAddAsync(
() => new Entity2 { Count = 5 }, where: p => p.Entity1Id == entityId);
}
This works correctly in version 8, but after upgrading to version 10 (10.0.6), I receive the following exception on the second call to UpdateOnlyFieldsAsync:
Unable to cast object of type ‘System.Func`1[Models.Data.Entity1]’ to type ‘System.Func`1[Models.Data.Entity2]’.
Is there something that needs to be changed in my code for the newer version, or could this be a bug in the library?