Base solution for your next web application
Open Closed

Making CRUD operations in MongoDB using AspnetZero #4202


User avatar
0
goldstone created

Hi,

I am using Hybrid solution for my application. I am using Sql Server and MongoDB. All of my entities are in sql. But I need to save some of logs in MongoDB. Can you please help me to create mongodb repositories? I have reviewed the Abp.MongoDb project. This can solve my problem, because my scenario is just saving logs and it is not relational . But I don't know how to integrate Abp.MongoDb to my solution.

Looking forward for your reply.

Thanks.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @goldstone,

    ABP's mongoDb packge is not production ready and it is not tested well. I suggest you to use mongoDb directly.

  • User Avatar
    0
    goldstone created

    Thanks Ismail for your reply.

    I know that Abp.MongoDB is not ready for production, but I want to use MongoDB as suggested by aspnetzero architecture. For example, I want to make MongoDBModule like EFCoreModule and consume it in my project. Because I couldn't find enough information about how to create my custom module for MongoDB and consume it in project thats why I want to use Abp.MongoDB with your support ;) :D I have mastered below links but couldn't integrated to my project. <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Dependency-Injection?searchKey=dependency%20injection">https://aspnetboilerplate.com/Pages/Doc ... 0injection</a> <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Module-System?searchKey=module">https://aspnetboilerplate.com/Pages/Doc ... Key=module</a>

    I just want simple CRUD operation for my case.

    I am looking forward for your reply.

    Thanks for your support.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @goldstone,

    Developing another module is easy actually. If you follow this document <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Module-System">https://aspnetboilerplate.com/Pages/Doc ... ule-System</a>, it is explained.

    Just create anoter class library project in your solution, add a module class in it. Then, add this new module to DependsOn list of your web module.

    For usage of MongoDb, there is no official example actually, you can try this sample <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1972#issuecomment-289720956">https://github.com/aspnetboilerplate/as ... -289720956</a>.