Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How To: Implement Many-to-many Relations Editing

$
0
0

This example shows how to implement many-to-many relations editing in an application generated with the DevExpress Scaffolding Wizard.


The resulting application supports adding multiple Course objects to the Student.CoursesAttending detail collection and vice versa.

You can encounter the following exception:

A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)

This error is caused because the EntityFramework uses the missing LocalDB component.

To fix the issue, locate the App.config file within your application and open it. Change the defaultConnectionFactory in the following manner:

[XAML]
<defaultConnectionFactorytype="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>