DAL Assembly in Prism

Topics: Prism v4 - WPF 4
Oct 18, 2012 at 8:33 PM
Edited Oct 18, 2012 at 8:35 PM

What I'm doing is Making a DAL with EF5 for Prism-WPF.

Here trying to separate each pieces as much as possible.

I saw samples on getting work a local app.config in DAL's.

Now I'm trying to do similar act.


I provided a sample binding on it,

In my real project the MVVM binding works fine, and just the problem was getting entity work.

in the provided simple sample I think may be a minor MVVM problem also happened which caused that in addition to EF Context, the binding should have an issue.

using EF5, Prism, Unity

The Sample:

There is a sample binding I'm looking to make it work.

Really needed help on this, and It's urgent for me.

please feedback on the code.

Oct 19, 2012 at 2:44 PM


I tried to open the link you provided and it seems to be broken. On the other take into account that as far I know there is no official guidance regarding Entity Framework in Prism as it was designed as a guidance for the client-side of the application. Therefore, in case your concern is related to the implementation of this framework I believe you could find better guidance on this subject for example in the ADO.NET Entity Framework Forums.


Agustin Adami

Oct 19, 2012 at 4:52 PM
Edited Oct 19, 2012 at 9:48 PM

Is it possible to not copy the connectionString to the main app and use it in just the DAL project.

like PrismTutorial here. Is it a good idea ?

please help me with the binding in the project. on the idea I've asked.

Oct 19, 2012 at 9:00 PM


Based on my understanding, WPF applications will only use the config file named YourMainProject.exe.config which is by default the App.config file defined in your main project, and as only one config file is loaded for the whole application, the connection string that is in your Business.Data project will not be used.

Hence in order to avoid this kind of error, your connection string should be defined in your Shell project's App.Config file. In my experience I have always followed this approach. Regarding your application, I added the connection string to the main config file, and changed the code to filter books with and Id that exists in your database, and could verify that your view model bindings work correctly.


Agustin Adami

Oct 19, 2012 at 9:47 PM

Thanks informing,

You should be right.