Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 24, 2013 11:54 PM by Decker Dong - MSFT
0 Points
28 Posts
Jan 24, 2013 12:18 PM|LINK
Hi asp.netforums,
As I am using the Entity Framework, I don't have any stand-alone Select query.
From my code you can see that in my EntityDataSource, I am using "MOSDevelopmentProjects.DAL.Development_ProjectsEntities".
<asp:EntityDataSource ID="ProjectEntityDataSource" runat="server" ContextTypeName="MOSDevelopmentProjects.DAL.Development_ProjectsEntities" EnableDelete="True" EnableFlattening="False" EnableUpdate="True" EntitySetName="ProjectInfoes" Include="Allocations"> </asp:EntityDataSource>
Thanks.
Member
604 Points
132 Posts
Jan 24, 2013 12:38 PM|LINK
i think the Allocations not relational table! please check are you asign forign key refer in mani table!
Jan 24, 2013 12:56 PM|LINK
I have realised that I am doing something wrong.
Apparently the code I am using to retrieve the record from the related table can only be used in a 1 to 1 relationship situation.
The related table is 1 to many.
............
Can someone assist me with changing my code to retrieve data from a related table in a one-to-many relationship?
All-Star
118619 Points
18779 Posts
Jan 24, 2013 11:54 PM|LINK
slick-asp.net Can someone assist me with changing my code to retrieve data from a related table in a one-to-many relationship?
Hi
If you wanna create a One-to-One relationship. You have to:
1) Create two tables with two primary keys inside.
2) Then open the two tables in SQL Managenent Studio, right click the db and choose "Diagram" folder.
3) Then import the two tables inside and then create relation between the two tables through the two tables' primary keys.
4) Just import the related tables into edmx file.
Reguards
slick-asp.ne...
0 Points
28 Posts
Re: Databinding error - does not contain a property with the name ...
Jan 24, 2013 12:18 PM|LINK
Hi asp.netforums,
As I am using the Entity Framework, I don't have any stand-alone Select query.
From my code you can see that in my EntityDataSource, I am using "MOSDevelopmentProjects.DAL.Development_ProjectsEntities".
<asp:EntityDataSource ID="ProjectEntityDataSource" runat="server" ContextTypeName="MOSDevelopmentProjects.DAL.Development_ProjectsEntities" EnableDelete="True" EnableFlattening="False" EnableUpdate="True" EntitySetName="ProjectInfoes" Include="Allocations"> </asp:EntityDataSource>Thanks.
asp.netforum...
Member
604 Points
132 Posts
Re: Databinding error - does not contain a property with the name ...
Jan 24, 2013 12:38 PM|LINK
i think the Allocations not relational table! please check are you asign forign key refer in mani table!
slick-asp.ne...
0 Points
28 Posts
Re: Databinding error - does not contain a property with the name ...
Jan 24, 2013 12:56 PM|LINK
Hi asp.netforums,
I have realised that I am doing something wrong.
Apparently the code I am using to retrieve the record from the related table can only be used in a 1 to 1 relationship situation.
The related table is 1 to many.
............
Can someone assist me with changing my code to retrieve data from a related table in a one-to-many relationship?
Thanks.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Databinding error - does not contain a property with the name ...
Jan 24, 2013 11:54 PM|LINK
Hi
If you wanna create a One-to-One relationship. You have to:
1) Create two tables with two primary keys inside.
2) Then open the two tables in SQL Managenent Studio, right click the db and choose "Diagram" folder.
3) Then import the two tables inside and then create relation between the two tables through the two tables' primary keys.
4) Just import the related tables into edmx file.
Reguards