Skip to content

Conversation

@souradip2k4
Copy link

feat(samples): Add .NET 8 & MongoDB CRUD Sample Application

Hi team,
Fixes #2340 Custom Link Text
This PR introduces a new sample application built with .NET 8 and MongoDB.

Why this should be worked on

The primary motivation is to expand our library of sample applications to demonstrate Keploy's capabilities with a widely-used enterprise technology stack. We currently don't have a sample for .NET + MongoDB, and adding one will help us reach and support more developers in the .NET ecosystem.

This sample will serve as a practical, real-world example for users who want to see how Keploy can be used to generate tests and mocks for a .NET Minimal API interacting with a NoSQL database.

What this PR does

This PR adds a complete, self-contained CRUD API application with the following features:

  • Framework: .NET 8 with modern Minimal APIs.
  • Database: MongoDB, using the official .NET driver.
  • Functionality: Full CRUD (Create, Read, Update, Delete) operations for a "Playlists" entity. It also includes more complex operations like adding/removing items from an array within a document.
  • API Documentation: Integrated Swagger/OpenAPI support for easy testing and discovery.
  • Configuration: Clean separation of concerns using appsettings.json for database connection details.
  • Best Practices: Includes a .gitignore file and a comprehensive README.md to guide users.

Keploy Integration

Once the application is running, users can leverage Keploy to record test cases and generate data mocks seamlessly. For example, a user could start recording API interactions with:

keploy record -c "dotnet run"

@souradip2k4
Copy link
Author

Hi I have added .NET and MongoDB sample app . Please review the PR
Thanks

@souradip2k4
Copy link
Author

Hi I have added .NET and MongoDB sample app . Please review the PR
Thanks

@pratik-mahalle
Copy link

Hey @souradip2k4, Thank you for raising the pr. Our team will review the pr soon before than please sign the DCO before commiting the changes

Copy link
Contributor

@Achanandhi-M Achanandhi-M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @souradip2k4 can you please record some test cases using keploy and add as part of this sample quickstart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants