locked
Dynamic Data over ADO.NET Data Service RRS feed

  • Question

  • User-1312311257 posted

    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? 

    Thanks,
    Dennis

    Friday, August 29, 2008 10:27 AM

All replies

  • User1641955678 posted

    If you look at the Dynamic Data Futures solution on CodePlex, it has an early version of something that does that.  Also, see this thread.

    thanks,
    David

    Friday, August 29, 2008 11:53 AM
  • User-1312311257 posted

    David,

     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?

     Thanks,
    Dennis

    Tuesday, September 2, 2008 3:04 PM
  • User1641955678 posted

    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?

    David

    Wednesday, September 3, 2008 2:04 AM