Last post Sep 02, 2008 07:54 AM by FerdASP
Sep 01, 2008 11:41 AM|FerdASP|LINK
I have seen there is a post: Dynamic Data Entity Framework Workaround
I am experiencing the same problem (No property or field 'xxx1' exists in type 'tabletype' ) in a LinqToSQL project, but the workaround seems to target Linq To Entities only.
Does the Dynamic Data Entity Framework Workaround also apply to LinqToSQL?
Sep 01, 2008 01:22 PM|Adult|LINK
I fixed it by using Where proprety on LinqDataSource,instead WhereParameters.
Sep 01, 2008 04:55 PM|scothu|LINK
Are you having this issue with a Dynamic Data application or is this justa general LinqToSql question? The issue the fix was for was for Dynamic Data applications. Give us more detail and we can try and help.
Sep 02, 2008 07:54 AM|FerdASP|LINK
This is a problem with dynamic data, which manifests as an error message in the form: No property or field 'xxx1' exists in type 'tabletype' .
This error can be provoked by having one field used in two foreign key relations.
A reproducable example:
Create a new dynamic data website, and add a new database to it.
In this database, we create two tables: One is going to represent Steps in a project, called STEP and has fields Project, Stepnumber and Description. Project and Stepnumber are the primary key.
The second table represents the restriction that some steps can only start when others finish, called RESTRICTION, has fields: ID, Project, StepPreceding and StepSucceding. ID is the primary key.
Now add two relations: RESTRICTION(Project,StepPreceding) ==> Step(Project,Stepnumber) and RESTRICTION(Project,StepSucceding) ==> Step(Project,Stepnumber)
Put these tables in a new dbml, enable dynamic data with scaffolding for it in the globals.asax and run.
Insert two steps in the step table, both project TEST, and stepnumber 1 and 2. In the restriction table add a row that step 1 must preceed step 2.
Now try to navigate from the RESTRICTION list to the steps. This will give an error.