SharpConnector is a general purpose multiple connector to NoSQL database. It simplifies the integration with the NoSql database by unifying the operations in a single interface without the need to develop specific logic for each connector. SharpConnector is a .NET 6 library. Each NoSQL database has its own peculiarities, some are document-oriented, others are of the key-value type,SharpConnector tries to unify the access interfaces in order to simplify the developments.
SharpConnector provides access to CRUD operations to NoSql databases with <Key, Value>, abstracting the interface from the implementation. Insert, Get, Delete, Update operations are currently exposed to the following databases:
- Redis
- MongoDB
- LiteDB
- EnyimMemcached
- RavenDB
other connectors and operations are under development.
To use SharpConnector simply configure the connectionString to the desired connector and the instance type. Add the ConnectorConfig node configuration within the appsettings.json file, here is the example for Redis connector:
{
"ConnectorConfig": {
"Instance": "Redis",
"DatabaseNumber": 0,
"ConnectionString": "redisServer:6380,password=password,ssl=True,abortConnect=False"
}
}
and instantiate a new client specifying the type of data (for example string):
SharpConnectorClient<string> client = new SharpConnectorClient<string>()
SharpConnector works with any object that is serializable.
Thank you for considering to help out with the source code! If you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you want to add new connectors, please follow these three rules:
- Each new connector must implement the IOperations interface.
- For each new connector the relevant UnitTest class must be present.
- Any third party libraries added in the code must be compatible with the MIT license, and the license must also be made explicit in the code.
Getting started with Git and GitHub
- Setting up Git for Windows and connecting to GitHub
- Forking a GitHub repository
- The simple guide to GIT guide
- Open an issue if you encounter a bug or have a suggestion for improvements/features
SharpConnector source code is available under MIT License, see license in the source.
SharpConnector uses the following externals references:
- StackExchange.Redis see license here
- MongoDB.Driver see license here
- LiteDB see license here
- EnyimMemcached see license here
- RavenDB see license here
Please contact at francesco.delre.87[at]gmail.com for any details.