Skip to content

NH-2187 - ElementAt LINQ extension method is not supported. #897

@nhibernate-bot

Description

@nhibernate-bot

Timur Kristóf created an issue — 25th April 2010, 15:45:39:

NHibernate's Linq provider currently doesn't support the ElementAt method.

It doesn't seem to be a quite difficult issue, so I gladly help out if someone gives me some pointers about how to implement it.


Fabio Maulo added a comment — 29th July 2010, 4:30:52:

Can you send a test ?
Over all what we need is the mapping and the LINQ you are using.
Note: ElementAt can be used only to query or


Timur Kristóf added a comment — 29th July 2010, 6:37:05:

Okay, I will put together a simple test case as soon as I can.


Fabio Maulo added a comment — 23rd September 2010, 9:00:26:

Thanks for the test.


Timur Kristóf added a comment — 23rd September 2010, 10:38:59:

Ooops! Soory, I forgot this bug completely. :(

I created a test right now. As it turns out, ElementAt is not supported by Linq To Sql either, so it seems that this is not unique to NHibernate. I'll attach the test solution right now. (I hope it's not a problem that I used Fluent for the mapping.)


Timur Kristóf added a comment — 23rd September 2010, 10:40:16:

Here is the test case for this bug. It creates a small database and puts some entities into it. Then, it tries to query the database using the ElementAt method, which turns out to be not supported.


Fabio Maulo added a comment — 23rd September 2010, 15:13:14:

No problems for FNH. I'll generate XML only using your classes.


Fabio Maulo added a comment — 23rd September 2010, 15:18:22:

Can you add some stuff about EntityFramework4 ? we will use it in our test.
Thanks btw.


Timur Kristóf added a comment — 23rd September 2010, 15:44:25:

I've never tried using EFv4. Although I can definitely say that EFv3.5 does not support it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions