Restore NuGet packages

Visual Studio C# projects included with the Ventura SQL templates have their NuGet packages folder deleted. This was done to keep the Ventura SQL installer small.



The Visual Studio solution needs to restore the NuGet packages folder. See topic Restore NuGet packages for more information.


In Visual Studio go to Build -> Rebuild Solution and wait for the packages to be restored.


Assembly references



Right-click "References" in the Solution Explorer and select "Manage NuGet Packages".



Select the "Installed" tab.


The package "System.Data.SQLite.Core" is the ADO.NET Provider for the SQLite database system.


The package "VenturaSQL.NETStandard" is the run-time for Ventura SQL.


MainWindow.xaml.cs



The MainWindow is the starting point for the application.


Ventura's DefaultConnector is an AdoConnector that is initialized with the SQLite provider and a connection string.


An AdoConnector connects directly to the database.




Note that changing to a 3-tier architecture would only require changing the connector to the HttpConnector.

The Recordset.ExecSql() and Recordset.SaveChanges() methods will use the VenturaConfig.DefaultConnector if no connector is specified as a parameter.

ListCountryViewModel.cs



This is the ViewModel for the County-list window.



The GetAll_CountryCodes_Recordset is initialized in the ViewModel.


ListCountryWindow.xaml



The recordset is data bound to ItemsSource property of the DataGrid.

ListCountryWindow.xaml.cs



ViewModel.CountriesRS.ExecSql() executes the SELECT * FROM CountryCodes statement and fills the recordset with data.