This gives you a guidance how to do a very basic, first step integration.

The goal is that you'll have another system which...

  • Runs with all the DLLs of 2sxc included
  • Is able to read data from 2sxc, which is in another Database

Preparation

  1. Make sure you have DNN running with 2sxc installed and some apps.
  2. The DB and files must be accessible from your own application in the initial phase

Basic DLL Steps

  1. Prepare the 2sxc / EAV, set up the repos so you can compile - note that you don't need to build the DNN solution, but the MVC. So you can skip the DNN-integration part with the paths etc.
  2. Compile the latest 2sxc and copy all relevant DLLs to your solution in Debug-Build (so you can later debug what's wrong)
  3. Load your application and verify that it still works
  4. Configure DependencyInjection with the IServiceProvider and ensure you add the core parts. Look at the MVC-project for inspiration
    1. AddSxcWebApi() - this may not be necessary at first, but we're not sure
    2. AddSxcCore()
    3. AddEav()
  5. Now also add the correct connection string using the static object ToSic.Eav.Repository.Efc.Implementations.Configuration. This is a bit hacky, but that's how it's done for now. Check out the MVC code for inspiration. 

Customize the most important classes

  1. Ensure your solution can load the global content-types
    1. Decide where to load the files from initially. This must return a path to where the json content-types lie of your system. So either point to the Dnn folder (ca. web/desktopmodules/ToSic_SexyContent/.data) or a copy of that folder in your environment. 
    2. Now create a YourPrefixGlobalFolderRepository inhertiing the FolderBasedRepository class, return the RootPaths of where these type-files are

Test if you can read data

  1. You should now be able to read data using the State.Get(zoneId, appId) object. Try it.