querybuilder
querybuilder copied to clipboard
How to deal with C# records' EqualityContract property?
I have a simple C# record, which I want to insert into the database using InsertAsync<> method of SqlKata. The insert fails with the following exception:
The member p0 of type System.RuntimeType cannot be used as a parameter value
I guess it is caused by the auto-generated EqualityContract property on the record. Is there a workaround for this in SqlKata? I'd rather not fall back to hand-written SQL statements yet.
Since "EqualityContract" has a type of "Type", should Query just ignore some types internally?
https://github.com/sqlkata/querybuilder/blob/064adccabd4e9d9dd54fa7dbd9e609610e10730e/QueryBuilder/Query.cs#L400-L411