Accessing EF Business Objects from a UI Project
To access an Entity Framework Business Object project from a User Interface project (such as WPF, Windows Forms, Web Forms), just add the Entity Framework Business Object to your solution, or you can add a reference to the Entity Framework Business Object assembly.
Afterwards, make sure you copy both the <databases> node and the <connectionStrings> node from your Entity Framework Business Object project's app.config into your UI project's application config file (app.config or web.config).
For example:
<databases>
<add key="Northwind\Connection" value="server=(local);uid=sa;pwd=;database=NorthWindEF;" />
<add key="Northwind\DataAccessClass" value="DataAccessSql" />
<add key="EntityDataModelContainer\DataAccessClass" value="DataAccessSqlEF" />
</databases>
<connectionStrings>
<add name="EntityDataModelContainer" connectionString="metadata=res://*/EntityDataModel.csdl|res://*/EntityDataModel.ssdl|res://*/EntityDataModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=(local);Initial Catalog=NorthwindEF;Integrated Security=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
</connectionStrings>
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 08/16/11
Comment or report problem with topic
