locked
problem using dynamic data generated code... RRS feed

  • Question

  • User-1922277577 posted

    hi,

    I created a .dbml file for dynamic data...

    now when i try to change the RegisterContext to my data, it said my data is undefined.

    My code:

    model.RegisterContext(GetType(SystemDataLSDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True})

     Error:

    SystemDataLSDataContext is undefined.

    I placed the dbml file in App_Code, and the dynamic data did generate the .designer.vb file.... I don't know what to do...

    Thanks...

     

    Wednesday, August 13, 2008 3:21 AM

All replies

  • User-330204900 posted

    Hi pc0416 it sounds to me like you are using a Web Application Project and if you are you need to specify the application namespace around your Linq to SQL classes or if you have specified a different namespace then you will need to either add a using or an Import to get the namespace into the Global.asax file [:D]

     Hope this helps [:D]

    Wednesday, August 13, 2008 5:03 AM
  • User-1922277577 posted

    thanks for the response...

     but i can't access anything inside that .designer.vb file... even i namespaced the context class, i can't access it outside..

     Help...

    Thanks,

     

    Alan,

    Wednesday, August 13, 2008 3:23 PM
  • User-330204900 posted

    Are you using a Web Application Project or a File Based website?

    Wednesday, August 13, 2008 3:30 PM
  • User-1922277577 posted

    I choose "Dynamic Data Web Application" at the New Project window... i guess i am using web application project???

     

    Wednesday, August 13, 2008 3:33 PM
  • User-330204900 posted

    Right I think its definitly a namespace issue what you need to do is open the Ddefault.aspx.cs code behind page and look at the namespace surrounding the page's class and put the same namespace around all the classes in the designer file.

    I've not used Web Application Project much so I'm not sure what you have done wrong but I'm certain it's not a Dynamic Data issue just a project setup issue.

    Hope this helps [:D]

    Wednesday, August 13, 2008 3:43 PM