Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Nov 26, 2009 12:00 AM|LINK
I'm using LINQ to SQL with Dynamic Data.
I have two tables: Users and Addresses:
When viewing the User table, I get a column on the end with 'View user addresses' linking like so: http://dev.cityslurp.com/Addresses/List.aspx?PrincipalId=18
So even though # 3 gives me an error, I think that it's the correct queryparameter to use.
Conversely, when I go to the Address/List.aspx page, I have a column with links back to the User Details page. The links correctly show the user's email address as the text, but again the link is wrong. For example for the same user, their link FROM the
address List page is: http://dev.cityslurp.com/Users/Details.aspx?Id=157221ef-c85c-4fdf-b861-60d149e11bfc
I'm assuming that the link should look like: http://dev.cityslurp.com/Users/Details.aspx?Id=70, which works to view the user details.
I'm thinking that either this maybe a bug, but surely others have successfully used one-to-many relationships using non-PK fields before?
The relationships look to be good, in that they are using the fields that I specified.
Here's an example of the relationship in the auto-generated DataAccess file:
public partial class Address : INotifyPropertyChanging, INotifyPropertyChanged
[Association(Name="Users_Address", Storage="_Users", ThisKey="PrincipalId", OtherKey="PrincipalId", IsForeignKey=true)]
public Users Users
foreign table link