From: Peter Duniho on
shapper wrote:
> Basically I am looking for:
> 1. Select the Entities.Regions (_context.Regions) which property
> Centers contains at least one center where Center.Open == true.
> 2. And instead of returning a IQueryable<Entities.Region> return a
> IQueryable<Models.Region>.
> In this case the map is simple:
> Models.Region has two properties: int Id and String Name
> Models.Entities has the same two properties: int Id and String
> Name.

That is basically exactly the solution for which I provided code the
last time you asked this question. It's not clear why you want an
IQueryable<Models.Region>, but it's trivial to create one from my
previous code simply by using the Queryable.AsQueryable() method.

> [...]
> Well something like this ... Does it make sense?

The main thing that doesn't make sense to me is why you ignored my reply
in the previous thread, a reply which would have solved your problem
directly.

I'm also a little confused by your description of "Models.Entities"; the
rest of your post seems to imply that the equivalent type to
"Models.Region" is not "Models.Entities", but rather "Entities.Region".
But hopefully that isn't a problem I need to worry about.

Pete
From: RayLopez99 on
On Feb 17, 4:09 am, shapper <mdmo...(a)gmail.com> wrote:

{stuff deleted}

Dude why don't you use the built in support WPF has (and Silverlight)
for hit regions, if you're trying to check for mouse clicks in certain
areas clicked on?

If you're not checking for mouse clicks, ignore this message.

RL