{"id":21326316,"url":"https://github.com/programando-ideas/webapi.mongodb","last_synced_at":"2026-03-06T20:03:21.481Z","repository":{"id":121412120,"uuid":"260553265","full_name":"programando-ideas/webapi.mongodb","owner":"programando-ideas","description":"ASP.NET Core WebApi + MongoDb","archived":false,"fork":false,"pushed_at":"2023-03-03T23:28:38.000Z","size":78,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T07:31:57.346Z","etag":null,"topics":["aspnetcore","csharp","mongodb","video","webapi-core","webapi-mongodb"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/programando-ideas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-01T20:34:45.000Z","updated_at":"2021-06-01T22:12:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6828f51-e17d-4457-a955-9e1b01cd6df7","html_url":"https://github.com/programando-ideas/webapi.mongodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/programando-ideas/webapi.mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programando-ideas%2Fwebapi.mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programando-ideas%2Fwebapi.mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programando-ideas%2Fwebapi.mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programando-ideas%2Fwebapi.mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/programando-ideas","download_url":"https://codeload.github.com/programando-ideas/webapi.mongodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programando-ideas%2Fwebapi.mongodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30195569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnetcore","csharp","mongodb","video","webapi-core","webapi-mongodb"],"created_at":"2024-11-21T21:09:12.678Z","updated_at":"2026-03-06T20:03:21.469Z","avatar_url":"https://github.com/programando-ideas.png","language":"C#","funding_links":["https://paypal.me/lp8126"],"categories":[],"sub_categories":[],"readme":"# ASP.NET Core WebApi + MongoDb\r\n\r\nProyecto con operaciones CRUD sobre **MongoDb** expuestas en una WebApi hecha con **ASP.NET Core 3.1***\r\n\r\n## Videos Youtube (𝖠𝖲𝖯.𝖭𝖤𝖳 𝖢𝗈𝗋𝖾 𝖶𝖾𝖻𝖠𝗉𝗂 + 𝖬𝗈𝗇𝗀𝗈𝖣𝖡 🚀🍃🎞)\r\n- [🎥 Parte I](https://youtu.be/mI64TjWxVgI)\r\n- [🎥 Parte II](https://youtu.be/j2f07ZGKqpo)\r\n\r\n### Herramientas necesarias para este video\r\n\r\n- [x] [MongoDb Server Community](https://www.mongodb.com/download-center/community)\r\n- [x] [MongoDb Compass](https://www.mongodb.com/download-center/compass)\r\n- [x] [Visual Studio 2019 Community](https://visualstudio.microsoft.com/es/vs/community/)\r\n- [x] [.net Core](https://dotnet.microsoft.com/download)\r\n- [x] [Postman free](https://www.postman.com/downloads/)\r\n- [x] [SoapUI Open source](https://www.soapui.org/downloads/soapui/)\r\n\r\n### Links con Documentación utilizada en los Videos\r\n- [x] [MongoDB db.createUser](https://docs.mongodb.com/manual/reference/method/db.createUser/)\r\n- [x] [MongoClient instance global](http://mongodb.github.io/mongo-csharp-driver/2.0/reference/driver/connecting/#re-use)\r\n- [x] [IQueryable Interface](https://docs.microsoft.com/en-us/dotnet/api/system.linq.iqueryable?view=netcore-3.1)\r\n- [x] [IMongoQueryable](https://mongodb.github.io/mongo-csharp-driver/2.4/apidocs/html/Methods_T_MongoDB_Driver_Linq_IMongoQueryable_1.htm)\r\n- [x] [Async dotnet](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/)\r\n\r\n## Startup.cs\r\n```csharp\r\nservices.Configure\u003cClientesStoreDatabaseSettings\u003e(\r\n                 Configuration.GetSection(nameof(ClientesStoreDatabaseSettings)));\r\n\r\nservices.AddSingleton\u003cIClientesStoreDatabaseSettings\u003e(sp =\u003e\r\n                 sp.GetRequiredService\u003cIOptions\u003cClientesStoreDatabaseSettings\u003e\u003e().Value);\r\n\r\nservices.AddSingleton\u003cClientesDb\u003e();\r\nservices.AddSingleton\u003cClientesDbAsync\u003e();\r\nservices.AddSingleton\u003cClientesDbQueryable\u003e();\r\n\r\n// http://mongodb.github.io/mongo-csharp-driver/2.0/reference/driver/connecting/#re-use\r\nservices.AddSingleton\u003cIClientSettingsService, ClientSettingsServiceMongoDB\u003e();\r\n```\r\n\r\n#### Logger en acción\r\n![](https://raw.githubusercontent.com/programando-ideas/webapi.mongodb/master/Imagenes/img_log_mongodb.PNG)\r\n\r\n## Elemplo de URLs para utilizar con Postman\r\n#### GET\r\n- http://localhost:5000/api/clientes/5eac64158a01245a2c89fb0c\r\n- http://localhost:5000/api/clientesiq/getbydir/123\r\n- http://localhost:5000/api/clientesasync\r\n\r\n#### POST\r\n- http://localhost:5000/api/clientes\r\n```json\r\n{\r\n  \"nombre\": \"Cliente 1\",\r\n  \"apellido\": \"Apellido 1\",\r\n  \"edad\": 37,\r\n  \"telefonos\": [\r\n    {\r\n      \"id\": 1,\r\n      \"tel\": \"+555555555555\"\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"tel\": \"+111111111111\"\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"tel\": \"+222222222222\"\r\n    },\r\n    {\r\n      \"id\": 4,\r\n      \"tel\": \"+999999999999\"\r\n    }\r\n  ],\r\n  \"direccionCliente\": {\r\n    \"id\": 0,\r\n    \"calle\": \"Calle 123\",\r\n    \"numero\": \"133\",\r\n    \"depto\": \"3a\"\r\n  }\r\n}\r\n```\r\n#### PUT\r\n```json\r\n{\r\n  \"id\": \"{Id Creado}\",\r\n  \"nombre\": \"Cliente 1 12345\",\r\n  \"apellido\": \"Apellido 1\",\r\n  \"edad\": 37,\r\n  \"telefonos\": [\r\n    {\r\n      \"id\": 1,\r\n      \"tel\": \"+555555555555\"\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"tel\": \"+111111111111\"\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"tel\": \"+222222222222\"\r\n    },\r\n    {\r\n      \"id\": 4,\r\n      \"tel\": \"+999999999999\"\r\n    }\r\n  ],\r\n  \"direccionCliente\": {\r\n    \"calle\": \"Calle 123\",\r\n    \"numero\": \"133\",\r\n    \"depto\": \"3a\"\r\n  }\r\n}\r\n```\r\n#### DEL\r\n- http://localhost:5000/api/clientes/5eac64158a01245a2c89fb0c\r\n\r\n## Directorio JsonTest\r\n#### Json con ejemplos para crear y actualizar un cliente\r\n- CREATE_POST.json\r\n- UPDATE_PUT.json\r\n#### Proyecto de SoapUI para ejecutar el \"Load Test\"\r\n- [LoadTest_MongoDB_API.xml](https://raw.githubusercontent.com/programando-ideas/webapi.mongodb/master/JsonTest/LoadTest_MongoDB_API.xml)\r\n\r\n![](https://raw.githubusercontent.com/programando-ideas/webapi.mongodb/master/Imagenes/img_soapui_test.PNG)\r\n\r\n------------\r\n#### Programando Ideas 2020\r\n\u003cp\u003e\r\n  \u003ca href=\"https://paypal.me/lp8126\" target=\"_blank\"\u003e\r\n    \u003cimg src=\"https://www.paypalobjects.com/es_XC/MX/i/btn/btn_donateCC_LG.gif\" border=\"0\" alt=\"Donar con PayPal\" /\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogramando-ideas%2Fwebapi.mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogramando-ideas%2Fwebapi.mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogramando-ideas%2Fwebapi.mongodb/lists"}