Last post Sep 03, 2008 02:04 AM by davidebb
Aug 29, 2008 10:27 AM|dmccarthy|LINK
I would like to create a dynamic data web site that does not have a database connection to the underlying database, but instead accesses the data through an ADO.NET data service. Is this possible?
ASP.NET Dynamic Data
ADO.NET Data Services
Aug 29, 2008 11:53 AM|davidebb|LINK
If you look at the
Dynamic Data Futures solution on CodePlex, it has an early version of something that does that. Also, see this
Sep 02, 2008 03:04 PM|dmccarthy|LINK
That's exactly what I was looking for. However, I am running into a problem when I try to develop my own dynamic data client site. I created a dynamic data web site, added a reference to my data service, copied the ModelProvider classes from the sample,
and modified globols.asax to pass the entities class from my service client to the DataServiceModelProvider constructor. The home page comes up fine, but when I click on a link to an list page, I get this error:
Unable to cast object of type 'AttendanceModel.AttendanceEntities' to type 'System.Data.Objects.ObjectContext'.
I modified the sample to use my data service, and everything worked fine. What special step did I miss in trying to reproduce the DataServiceClientSite project?
Sep 03, 2008 02:04 AM|davidebb|LINK
Note that the sample uses modified page templates. e.g. it uses DataServiceLinqDataSource (which is part of the sample) instead of the default data source. Could this be the issue?