DataTableGenerator.cs contains logic to customize the generation of value types by TypeCode value, and falls back on a generated proxy to context.Generate<T> for unrecognized types. The initial implementation of this includes an unnecessary constraint that T be a reference type. This means that columns of types like DateTimeOffset will fail.
This PR:
Updates the automated testing to trigger this problem.
Removes the constraint on the proxy type, allowing generic context.Generate<T> calls with value types.
DataTableGenerator.cs contains logic to customize the generation of value types by
TypeCode
value, and falls back on a generated proxy tocontext.Generate<T>
for unrecognized types. The initial implementation of this includes an unnecessary constraint thatT
be a reference type. This means that columns of types likeDateTimeOffset
will fail.This PR:
context.Generate<T>
calls with value types.