views:

278

answers:

1

I'm just starting out with the Entity Framework and ADO.NET Data Services and I've run into an issue that I can't seem to figure out. I have two tables, one that has user information and the other that has a created by field. Within the database, there isn't a foreign key between these tables. The user table contains an arbitrary Id, a username, and a display name. The created by field contains the user's username. In my entity I would like to have the user's display name since this is what I need to display and expose over the ADO.NET Data Service? I'm aware that I could restructure the database, but I was hoping that I could do the join using the username as I would in a SQL statement.

Thanks in advance,

-Damien

A: 

You can make a view using a join of both tables, and then use this object to display the user's name.

There's some info on mapping custom queries here.

sandesh247
I ended up adding a defining query based on the link you provided and then merged the property into the item.
dwhite