
Explore MongoDB for .NET/C# developers: connect with the MongoDB driver, query and retrieve data, and leverage its flexible schema for big data and social network projects.
MongoDB basics introduce a NoSQL document store with dynamic schema, where databases contain collections of documents that store data as key-value pairs.
Install the MongoDB community server from the official site using the installer, then connect locally, create a database and an items collection, and insert a sample document.
Set up a new .NET console project, install the MongoDB driver package, create a MongoClient with a connection string, and connect to a database to verify a successful MongoDB connection.
Create databases and collections in MongoDB using a .NET client, insert documents with fields like name and price, and fetch the first document.
Query a MongoDB collection for a single item in C# by building filters with the filter builder, filtering by name and price to retrieve a precise document.
Query a MongoDB collection for multiple items using filters and projections to return a list of documents. Iterate asynchronously with foreach and cursors to handle large or binary objects.
Learn to apply sorting to a collection query using the sort definition builder, selecting ascending or descending fields such as name or price to order results.
Master collection projection in MongoDB, using the project builder to retain data while excluding large fields like binary data or images, and omit the id column from results.
Learn how to insert multiple documents into the items collection using insert many and insert many async, by building a list of dummy documents with item, price, and item description.
Update documents in MongoDB using a filter and update one or update many with new values like name and description, inspecting matched, modified, and upserted flags.
Learn to delete documents in MongoDB for .NET/C# developers using deleteOne and deleteMany with filters, verify by finding a single document before deleting, and empty a collection via regex.
Install and configure mongodb for asp.net core by creating a new api project, adding the mongodb driver, and setting up swashbuckle for swagger, with an item service.
Connect a .NET/C# app to MongoDB by configuring the development settings, database name, and collection, then implement a get all items API controller using a find call.
Implement a single insert method that takes an item, calls the collection, and saves it via the items controller and item service, and verify the insertion with swagger post.
Update a MongoDB document by retrieving an item, changing its name and price, and replacing the document via the replace one method in the items service.
Hello and welcome to this course. This course will help you in using MongoDB with .NET. MongoDB is one of the most well known NoSQL Databases that is used around the world. MongoDB as a NoSQL database has many advantages over traditional software such as the dynamic structure that allows you to store different shapes of data.
MongoDB will allow you to store data in JSON format like where you have the ability to add different sets of JSON documents that do not look alike in the same collection. Collections are like tables where you store the data that you desire. After storing document you can query them inside a collection like a SQL database but with a unique query syntax.
MongoDB can be used for different project types. But, it recommended for Big data projects. Also, Content Management and Social Networks. If you find yourself cannot decide on a certain structure for the database you can use MongoDB where it gives you the most flexibility for your work.
MongoDB can be used for .NET Core Projects and .NET Framework projects. For MongoDB, you can either host it's database server locally or uses online MongoDB cloud providers.MongoDB can be replicated easily and also scaled out. Many features available for you that you can use to optimize the database to suit your needs and work.
MongoDB's main difference is the structure of the stored data. But, the query is like any SQL database where you can limit your selection of columns or add where clauses to your selections to limit data retrieval. Also, you can order by the results just as you do with SQL.
This course will help you with MongoDB basics where you will be able to create a .NET application that will connect to MongoDB to save and retrieve the data. Also, we will add an ASP.NET Core Application where you can save and retrieve data to MongoDB via ASP.NET Core API.