Last post Sep 23, 2008 03:01 PM by jtlembke
Sep 22, 2008 08:22 PM|jtlembke|LINK
I really love Dynamic Data, but some key things, mostly how it works with Entity Framework, are really throwing me.
I think what I want to do should be pretty darn simple:
My Sales Entity has a relationship (so no Linq to SQL answers [;)] since there are no FKs ) to a Region Entity. I want my custom ListDetails page to load already filtered by the Region of my choice. (I'll be basing that on the location of the user).
I'm guessing I use a WhereParameter, or a Where clause to do that in Page_Init(), but I don't know how to do that. I think knowing how to do this with the EntitiyDataSource would solve many of the problems I've been having, all of which have to do with edm
relationships vs. foreign keys.
Can anybody help me with this?
Sep 23, 2008 02:01 AM|sjnaughton|LINK
This is what I tried on Northwind with EF
GridDataSource.WhereParameters.Add(new Parameter("Employees", DbType.String, "Fuller"));
Which obviously doesn't work but how do you referance the say "LastName" property of the
Also this seems the same wit Linq to SQL
Sep 23, 2008 12:32 PM|jtlembke|LINK
Right, this is my problem. How do I use an EF relationship in a situation like this? There is no "DbType.Region".
I'm continuing to pound my head on this, among other DD/EF related issues, so any help here is HIGHLY valued... :)
Sep 23, 2008 02:19 PM|marcind|LINK
Have you tried the
Entity Framework forum?
Sep 23, 2008 03:01 PM|jtlembke|LINK
Yes, and I think I may have someone helping on this one now from over there.
I'm learning both DD and EF at the same time. I have a handful of issues and sometimes it's a little unclear which domain the problem belongs in.