CodeSmith Community
Your Code. Your Way. Faster!

Errors and strange behaviour of Provider property of typed EntityDataSource

Latest post 11-02-2006 10:11 AM by Robert Hinojosa. 1 replies.
  • 11-02-2006 4:54 AM

    • Tanno
    • Top 100 Contributor
    • Joined on 10-06-2006
    • Posts 50
    • Points 1,215

    Errors and strange behaviour of Provider property of typed EntityDataSource

    In the generated code of the Admin Edit/Insert pages one will see a typed EntityDataSource with a script that contains only 3 properties

    for example:

    <data: CompanyDataSource ID="CompanyDataSource" runat="server" SelectMethod="GetByCompanyID" EnableTransaction="false">

     This compiles and works.

    However when I try to add the datasource to a page by drag and drop, it creates many more properties including 

    provider="" (a property that does not appear in the property inspector)

    Not filling in a value for the Provider leads to an error. After deleting again all extra created properties (including Provider) from the tag, this error disappears, at least when dealing with a single page. 

    However, when I try to use the same script code inside a wizardstep and go to design view I get the "Object reference not set to an instance of an object" error. This can only be again the Provider

    But when I set Provider  to "CompanyService" or "CompanyProvider" or even "DataRepository.CompanyProvider" then I get the error:

    Cannnot create an object of type 'TestLogin.DataAccess.IEntityProvider from its string representation for the 'Provider' property.

    So what should be done with this property ?

    And why am I forced to use it if the Admin pages do not use it ?

    Any help would be appriciated

     

     

      

     

     

    In a single page I can put a typed EntityDataSource connected to a MultiFormView that contains an InsertItemTemplatePath to create an insert page. This compiles and works.

    However, when I try to do the same in a wizardstep I get design view control errors.

    I tried it in two different ways:

    1) When I copy and paste the script sourcecode for the EntityDataSource and MultiFormView inbetween the wizardstep tags, and switch to design view I get "

     

       

    • Post Points: 35
  • 11-02-2006 10:11 AM In reply to

    Re: Errors and strange behaviour of Provider property of typed EntityDataSource

    Using Drag and Drop will attempt to put any public properties, which of course is a pitfall of it.  I'm sure there a way to probable define this in the controls, we just haven't gotten to that yet.

    The provider property is handled internally, but is exposed for you to consume.  So you should not be setting the provider property.


    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems