× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Non-static method requires a target. cant find an answer that seems to work

James Jensen
Feb 10, 2015
<p>Reading through other StackOverflow posts about this error, it appears to happen when a <code>where</code> clause refers to a value that is null. Based on that, I'm guessing that your <code>aaid</code> object is null when you run this.</p> <pre><code>var aaresults1 = db.AAs.AsQueryable(); if(aaid != null) { aaresults1 = aaresults1.Where(a =&gt; a.AAID == aaid.AAID); } </code></pre> <p>This tip was originally posted on <a href="http://stackoverflow.com/questions/23855987/Non-static%20method%20requires%20a%20target.%20cant%20find%20an%20answer%20that%20seems%20to%20work/23856116">Stack Overflow</a>.</p>
comments powered by Disqus