Skip to content

Are anonymous types supported when used inside a list? #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stecydube opened this issue Jun 28, 2018 · 3 comments
Closed

Are anonymous types supported when used inside a list? #46

stecydube opened this issue Jun 28, 2018 · 3 comments
Assignees
Labels

Comments

@stecydube
Copy link

In trying to display a list with items made from an anonymous type the code in LinqPAD could not be compiled and complained about a possible missing reference.

Part of the generated code:
truck.UnLoadCargo<List<AnonymousType<Guid, String ......

@codingadventures
Copy link
Owner

Hi, it should work with anonymous types, however I can see the error here: AnonymousType
There no such a thing like an AnonymousType class that represents anonymous types. This is clearly a bug, I'll investigate and provide a fix in the next release

@codingadventures
Copy link
Owner

To fix your issue change in the linqpad script
truck.UnLoadCargo<List<AnonymousType
with
var @object = truck.UnLoadCargo(typeof(IList));
That should retrieve the list with the anonymous type.

I will include a proper fix in the next release

@codingadventures codingadventures added this to the LINQBridgeVs 1.4.7 milestone Sep 30, 2018
@codingadventures
Copy link
Owner

fixed in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants