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

How to build a fully-functional and well-organized MVVM application in a few clicks with DevExpress components (Visual Studio 2012+)

$
0
0

This Code Central example is part of a tutorial that demonstrates how to build a fully functional and well-organized MVVM application in a few clicks: Getting Started. You can also watch the WPF Scaffolding Wizards video that replicates the steps of the first lesson in the tutorial.

The sample is built for Visual Studio 2012+. If you're using Visual Studio 2010, here is another example that is adapted for this version: E4700: How to build a fully-functional and well-organized MVVM application in a few clicks with DevExpress components (Visual Studio 2010).

In the solution folder, you can find a Northwind improved database (with improved pictures and updated dates). This database is used in the sample as a data source.

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"/>
Question Comments

Added By: Martin Radvansky at: 7/15/2013 6:52:51 AM    

Is possible to use XPO?

Added By: Alexander (DevExpress Support) at: 7/15/2013 7:15:55 AM    

Hi Martin,

I am afraid no, XPO is not supported by Scaffolding Wizards at the moment.

Added By: WillAutio at: 3/8/2014 2:50:23 PM    

How can I get the Instant layout assistant to work with MS Access? I can make DataSets. Does it need EF models?
Thanks

Added By: Alexander (DevExpress Support) at: 3/12/2014 2:54:10 AM    

Hello,

Instant Layout Assistance is a feature that improves your experience while you work in the Visual Studio designer. As I understand, you are talking about our Scaffolding Wizards. It allows generating base classes, view models, and views based on your data model. The only requirement of Scaffolding Wizards is that a valid DbContext-based Entity Framework model is used.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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