Here are some useful steps that can help you accomplish this task successfully:
- 1. Add .dll file references
- 2. Web.Config file changes
- 3. Changes in Application_Start method of Global.asax.cs file
You will also require the following .dll file references:
- 1. EntitySpaces.Core.dll
- 2. EntitySpaces.DynamicQuery.dll
- 3. EntitySpaces.Interfaces.dll
- 4. EntitySpaces.Loader.dll
- 5. EntitySpaces.Npgsql2Provider.dll (to connect Postgres using entityspaces)
- 6. Mono.Security.dll (required for Postgres)
- 7. Npgsql.dll (required for Postgres)
Now you are all set to perform steps required to update the web.config file. Here is what you need to do:-
First, add sectionGroup node in configuration > configSections node as shown in the screenshot below:
Add EntitySpaces node in configuration section as shown in the following screenshot
Next, change the code in Application_Start method of Global.asax.cs file as shown below to register changes in config:
That’s it! The code should run as needed. In case you have an error message and need some help, this link may help you out:
http://www.ideatoworking.com/Blogs/ID/7/Strange-error--Unable-to-Find-EntitySpacesNpgsql2Providerdll