# Create a RESTful API with .NET Core and MongoDB

DevFeed: [Create a RESTful API with .NET Core and MongoDB](<https://devfeed.tech/articles/create-a-restful-api-with-net-core-and-mongodb-21810.md>)

Original publisher: [Read original article](<https://www.thepolyglotdeveloper.com/blog/2022/02/create-restful-api-dotnet-core-mongodb/>)

Author: Nic Raboy

Published: 2022-02-23T14:00:00Z

Content type: tutorial

Language: en

Sources: [Nic Raboy](<https://devfeed.tech/sources/nic-raboy.md>)

Topics: [.NET](<https://devfeed.tech/topics/net.md>), [ASP.NET Core](<https://devfeed.tech/topics/asp-net-core.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [API](<https://devfeed.tech/topics/api.md>), [CRUD](<https://devfeed.tech/topics/crud.md>), [Web app](<https://devfeed.tech/topics/webapp.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [atlas](<https://devfeed.tech/tags/atlas.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [cli](<https://devfeed.tech/tags/cli.md>), [collection](<https://devfeed.tech/tags/collection.md>), [crud](<https://devfeed.tech/tags/crud.md>), [csharp](<https://devfeed.tech/tags/csharp.md>), [database](<https://devfeed.tech/tags/database.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [driver](<https://devfeed.tech/tags/driver.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [model](<https://devfeed.tech/tags/model.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [net](<https://devfeed.tech/tags/net.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [service](<https://devfeed.tech/tags/service.md>)

## AI overview

The tutorial builds on an earlier .NET Core console app by creating a RESTful API for basic CRUD operations against MongoDB Atlas. It requires a deployed, configured Atlas cluster (M0 or higher) and .NET Core 6 or later; cluster setup is outside its scope, and the examples use .NET Core 6. Initial steps create a web API project with the .NET Core CLI, install the MongoDB driver, define connection, database, and collection settings in a model, and store those values in appsettings.json. The excerpt names the sample_mflix database and playlist collection but does not show the API endpoint implementation.

## Source excerpt

If you've been keeping up with my development content, you'll remember that I recently wrote Build Your First .NET Core Application with MongoDB Atlas, which focused on building a console application ... The post Create a RESTful API with .NET Core and MongoDB appeared first on MongoDB.