This is a migrated thread and some comments may be shown as answers.

Visual Entity Designer and n-tier applications

1 Answer 121 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hendrik
Top achievements
Rank 2
Hendrik asked on 24 Mar 2010, 05:20 PM
I have an n-tier web application. There's a Model class library containing the Domain Model created with the Visual Entity Designer. Then there's a Service class library responsible for direct communication with the Model (in this case Model == Repository). And there's my web application project calling the service. When my web application tries to query the database through the service I get an error:

Message: Sys.WebForms.PageRequestManagerServerErrorException: No persistent class could be found.
To define persistent classes use the [Persistent] attribute at the class level.
If multiple projects are used additional references must be made in the configuration file.
To update the required references use 'Update Config References' from the OpenAccess menu.


When using the Visual Entity Designer you the 'Update Config References' menu option is disabled. As are most of the options from the OpenAccess menu. What references and/or App/Web.config additions have to be made in order to make my simple n-tier model to get to work?

  1. Model class library project containing the Domain Model created with the Visual Entity Designer
  2. Service class library  project referencing the Model class and calling the Domain Model methods ('GetAll', 'Save', 'Delete', etc.)
  3. Web application project referencing the Service class and using the service to query the database behind the Domain Model

Please advise. I can't find any examples or forum topics concerning n-tier design when using the Visual Entity Designer.


Hendrik

1 Answer, 1 is accepted

Sort by
0
Hendrik
Top achievements
Rank 2
answered on 25 Mar 2010, 04:06 PM
I got it to work!

I had to add the connection string to the Web.config of the web application. Kinda makes sense...
Tags
Getting Started
Asked by
Hendrik
Top achievements
Rank 2
Answers by
Hendrik
Top achievements
Rank 2
Share this question
or