Problem creating an Entity object/queryable from the result of a LINQ join in MVC?

I think you're making this more complicated than it needs to be. If I understand what you're trying to do, you should be able to do something like this: if (!String. IsNullOrEmpty(searchViewModel.

Comment)){ po = po. Where( o => o. PurchaseOrderComments.

Any( c => c.CommentText. Contains(searchViewModel. Comment))); }.

I definitely did, that did the trick. Thanks very much! – Jeff Aug 12 at 12:00.

StriplingWarrior's solution is the best way. In case that your PurchaseOrder class really doesn't have a navigation collection of PurchaseOrderComments (which would force you to use a join) the following should work and is simpler as your double projection: po=po. Join(helper, r => r.

PurchaseOrderID, you => u. PurchaseOrderID, (r, u) => r).

If a topic relates in any way to the code that causes a machine to produce a desired result, it's welcome here.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions