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

Crash during ExpressionDispatcher with nested query #327

Open
GoogleCodeExporter opened this issue Apr 24, 2015 · 0 comments
Open

Crash during ExpressionDispatcher with nested query #327

GoogleCodeExporter opened this issue Apr 24, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
[Table]
class WpPost
{
 [Column]
 public string PostName{get;set;}
}

public WpPost GetPostByUri(Uri uri)
        {
            if (uri == null)
                throw new ArgumentNullException("uri");

            using (var db = new WordPressDataContext(ConnectionName))
            {
//uri = http://wasntnate.com/some/page-name/argument
                var segments = uri.Segments.Select(s => s.TrimEnd('/')).ToArray();

                var post = (from p in db.WpPosts
                            where (from s in segments
                                   where s == p.PostName
                                   select s).Count() > 1
                            select p).FirstOrDefault();

                return post;
            }
        }

What is the expected output? What do you see instead?
Expression evaluation is able to succeed and query sent to MySql 

What version of the product are you using? On what operating system?
DbLinq 0.20.0.0

Feel free to contact me if need more info:
http://wasntnate.com/2012/02/crashing-dblinq-with-embedded-query/

Please provide any additional information below.

Original issue reported on code.google.com by itsnatet...@gmail.com on 23 Feb 2012 at 5:21

Attachments:

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

1 participant