Skip to content

05. Driver infrastructure

Akos Nagy edited this page May 4, 2018 · 1 revision

Driver infrastructure

If you want to contribute, you need to understand how the driver is built up.

First read the documentation on how to create a data context driver for LinqPad. Also, go and read my blog posts on how I made the driver. These two should help clear things up and get you started with the rest of this.

Basic components

The driver has 3 basic components (3 projects, if you want):

  • CosmosDbContext: This is responsible for connecting to the database, executing your quries etc. This is sort of like the DbContext class of Entity Framework. If you want to add new features, this is probably where you have to write most of the code.
  • CosmosDbAdoNetProvider: This is responsible for executing the raw SQL queries, so if you want to add something to that specific feature, this is where you'll have to dig.
  • AzureCosmosDbDriver: This is the actual driver, that integrates the two other libraries into LinqPad.

How do they fit together?

The CosmosDbContext and the CosmosDbAdoNetProvider are separate Visual Studio projects and they also live in their separate repositories. This repository is the repository of the AzureCosmosDbDriver. The other two repositories are included as submodules in this repository and they are added to the solution of the AzureCosmosDbDriver. If you want to contribute, you have to be careful to clone everything and update the submodules as well.