-
Notifications
You must be signed in to change notification settings - Fork 145
Installing Insight
Jaxel Rojas edited this page Jun 23, 2020
·
5 revisions
It's easy to get started with Insight.Database.
- Add Insight.Database Nuget Package to your project. From the Package Manager Console its:
PM> Install-Package Insight.Database
- If you're using a database other than SQL Server, get the proper provider package (e.g. Insight.Database.Providers.MySql).
- Import the extensions into your code by adding
using Insight.Database;
- Register the provider for your database (see below).
- Write code.
Insight will attempt to auto-register any provider DLLs it finds in your application search path or in the same folder as the Insight.Database assembly.
However, for some project configurations (e.g. add-ins or class libraries created in another folder), auto-registration may fail to find the provider assembly. You'll get an exception that says:
Have you loaded the provider for your database?
If you get this in your project, you can force Insight to load a particular provider by calling the RegisterProvider method on the database provider.
For example:
using Insight.Database;
// at some point in application startup...
SqlInsightDbProvider.RegisterProvider();
Or:
using Insight.Database.Providers.MySql;
// at some point in application startup...
MySqlInsightDbProvider.RegisterProvider();
See Insight and Data Providers for the list of providers. And see Hello World if you are ready to run some code.
- Home
- About
- Getting Started
- Connections
- Execute
- Getting Results
- Advanced Results & Mapping
- Insert/Update Considerations
- Data Types
- Write Even Less Code
- Performance & Speed
- Other Topics
- Supported Databases
- Working with the Code