July 17, 2021

HarperDB Nuget pkg to perform CRUD operations with ASP.NET CORE

Welcome to Community Posts
Click below to read the full article.
Summary of What to Expect
Table of Contents

Implemented a generic HarperDB client which can be used with any .Net core base project for integration with HarperDB

  1. HarperDbConfiguration: A class with properties to store the configuration details required to establish connections with HarperDB, such as the Instance URL, AuthToken, and Schema.
  2. HarperDbResponse: A class representing the response received from HarperDB, containing properties like StatusCode, Content, ResponseStatus, and StatusDescription.
  3. HarperDbRequest: A class used to generate the request object sent to HarperDB for operations like insert, update, and delete.
  4. IHarperClient: An interface that declares methods for various CRUD and DDL (Data Definition Language) operations supported by the custom HarperClient.
  5. HarperClient: The main class that handles the logic for CRUD operations with HarperDB. It uses RestSharp for HTTP requests and implements methods for creating schemas, tables, and performing CRUD operations.
  6. IConfigurationHandler: An interface with a method to get HarperDB configuration details from the app settings.
  7. ConfigurationHandler: A class that implements the IConfigurationHandler interface and provides methods to retrieve HarperDB configuration details from app settings.
  8. DependencyInjector: A static class containing an extension method for IServiceCollection to resolve dependencies for various repositories.
  9. Repositories: Classes/interfaces that handle CRUD operations for the Domain entity and DDL operations for schema and table creation.
  10. Controllers: API endpoints for handling schema and domain-related operations, using the corresponding repositories.
  11. Startup.cs: Configures dependency injection for the required repositories.