.Net Client Send Data to mongoDB

Hello everyone , Previously I was sending the data from .Net client using model (EF) to PostgreSQL database (code first approach).
I am new to mongoDB. Can anyone please help that how can .Net client send data(model) to mongoDB database. And how can .Net client send corresponding requests to mongoDB.(code first approach).

Hi @Nitesh_Giri, welcome to the community. :wave:
I am not sure if I am getting your query correctly, but you want to integrate MongoDB into your .Net project right?
If that’s the case, you can take a look at this tutorial to quickly get started with .Net and MongoDB.

Also, in case you want to get a deep dive by building a project and implement APIs for the same, take a look at M220N: MongoDB for .NET Developers course.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

1 Like

Hi @SourabhBagrecha , thankyou for the reply.
Actually I Was previously using Postgres and here using Entity framework I send my data Model. And the using client I send the data in the data Model. The same thing I want to do with mongodb but I am not Sure that I van use Entity framework to migrate my data Model to mongodb.

Hi @Nitesh_Giri, :wave:
If I am understanding your query correctly, you are referring to using an ORM (Entity Framework) with Postgres instead of writing SQL queries.
There are some community-supported frameworks like MongoDB.Entities but we would encourage you to start with the MongoDB’s .NET driver directly. It includes LINQ support for building queries and there is a more direct relationship between model classes and how data is stored in MongoDB.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.