The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Doing some testing on specific data meant I added one extra filter on the where clause saying basically "&& a.id == "A54321" - simple.
The query blew up because it referenced a field that was not yet defined in TEST (but was in DEV). My query didn't reference the field at all but somehow EF picked up that it needed to be ignored and referenced it so that it could ignore it(?) - causing the crash.
When I didn't add the extra filter the query worked fine. A friend suggested I should add the filter before the other parts of the where clause - so I did - and it worked!
Neither of us can understand why.
- I would love to change the world, but they won’t give me the source code.
If you want to auto-generate, you can add a ADO.Net component to your solution, and use it to auto-generate from stored procs (as long as you're not selecting from a temp table or cte).
The only problem is that ado.net doesn't update correctly, so any update to your generated entity needs to be done manually.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
Last Visit: 27-Jan-20 3:06 Last Update: 27-Jan-20 3:06