Skip to content
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

select maximum value for a property is borken [DNET429] #426

Closed
firebird-automations opened this issue May 9, 2012 · 2 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: Jeldrik Hornschild (jeldrik)

If you have Table:

CREATE TABLE Some_Table
(
ID INTEGER NOT NULL PRIMARY KEY,
Some_Value VARCHAR(50) CHARACTER SET UTF8 NOT NULL
}

a mapped POCO class:

public partial class SomeTable
\{
    #⁠region Primitive Properties

    public virtual int ID
    \{
        get;
        set;
    \}

    public virtual string SomeValue
    \{
        get;
        set;
    \}

}

The following statement produces an ArgumentNullException saying that "Value cannot be null. Parameter name: key":

using (var context = new MyContext())
{
var maxID = context.SomeTable.Max(st => (int?)http://st.ID) ?? 0;
}

Commits: 046b16a

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: vNext [ 10466 ]

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

No branches or pull requests

2 participants