Skip to content

Allows your Umbraco website to store external data in a NoSQL MongoDB database server

License

Notifications You must be signed in to change notification settings

prmeyn/UmbracoExternalStorageWithMongoDB

Repository files navigation

What does this package do?

This package allows you to store your custom data in a NoSQL MongoDB database. Unlike most NoSQL databases, a MongoDB server can be installed on almost any platform, your laptop or on a Cloud service like AWS, GCP or Azure. It avoids vendor lock-in into any specific hosting platform.

Setup procedure

  1. Setup a MongoDB server either locally on your laptop or you can use the MongoDB free hosting plan to create an instance on AWS, GCP or Azure.
  2. Update appsettings.json file with the connection string to the above database
{
	"MongoDbCredentials": {
	    "ConnectionString": "<mandatory> mongodb+srv://cluster0.fyu.mongodb.net/?authSource=%24external&authMechanism=MONGODB-X509&retryWrites=true&w=majority",
		"CertificateFilePathWithName": "<optional Certificate file path with name [pfx file]>",
	    "CertificatePassword": "<optional Certificate password>"
	  }
}
  1. Install this package

Sample code

var database = MongoDBClientConnection.GetDatabase("YouDatabaseName");
var collection = database.GetCollection<T>("YourCollectionName"); // of type T

For more examples on how to Insert, Modify your data, check the MongoDB official documentation: https://www.mongodb.com/docs/drivers/csharp/current/quick-reference/


Want to sponsor?

This is a free package, but if you want to sponsor my open source work, here is my GitHub profile

About

Allows your Umbraco website to store external data in a NoSQL MongoDB database server

Resources

License

Stars

Watchers

Forks

Packages

No packages published