Repodb: Request: F# - Consider the Anonymous Types in the Query and QueryAll operation

Created on 1 Sep 2020  路  5Comments  路  Source: mikependon/RepoDB

In C#, there is no way to inferred the anonymous types within the generic type argument when calling the generic methods (i.e: ExecuteQuery<TEntity>(SQL), Query<TEntity>(tableName),QueryAll<TEntity>(tableName) and QueryMultiple<T1, T2, ..., T7>).

However, in F# the call is possible. See the screenshot below, provided by @isaacabraham.

Working Call:

image

Non-working Call:

image

This User Story will enable the library to consider the support to the Anonymous Types (or Anonymous Records) when calling the mentioned method above.

Fixed deployed request todo

Most helpful comment

The fix is now available at RepoDb v1.12.0-beta2.

All 5 comments

Note: First screenshot works. Second one fails with "Value cannot be null (Parameter 'source')".

The fix is now available at RepoDb v1.12.0-beta2.

Glad this was quickly implemented
I just tested it seems to work like a charm
image

I'll let you know if I find any issues, also I'll try to send a PR to the F# sample later today with precisely this change

@AngelMunoz - thanks! Yes, please do comments all the problems you found during your penetration tests on this User Story.

Closing this ticket now. Thanks

Was this page helpful?
0 / 5 - 0 ratings