Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.6 KB

File metadata and controls

56 lines (42 loc) · 1.6 KB

MongoDB_First_Steps

A Repository of all scripts i'm using to learn MongoDB

mongo

What operations you can run?

  • CRUD
    • Create
    • Read
    • Update
    • Delete
  • Aggregations
    • Match
    • Group
    • Sort
    • Projection

How can I run the code?

  • instal .NET 7
  • Create an Atlas Cluster, Project and a Collection.

    Atlas is a Cloud DBMS for MongoDB

  • Certify your network accesss and connection string at Atlas.
  • Fork this repositóry
      git clone https://github.com/KevinFGR/MongoDB_First_Steps.git
    
  • Change the db_name tha is passed as the parameter of connectDb method in the contructor at the Connection/Connection.cs
  • Also change the connection string and the collectionDB name at Connection.cs to your currently DB
  • Check the Program.cs and uncoment what operations you want to run
  • Open your command line at the same directory that Program.cs is and type
      dotnet run
    

Possible Exceptions

  • bad Auth: It means there's something wrong with your connection string, verify you you inserted your nickName and Password correctly.
  • Check if you inserted your network IP at Atlas network access, otherwise Atlas won't let your computer access the DB by code.