Base solution for your next web application
Open Closed

How to add a new database type (MongoDB repository) #4584


User avatar
0
[email protected] created

Hi,

I want to add supporting for MongoDB as a data repository. How would you recommend the code structure should be?

I already created a new assembly and added a MongoDB repository, and added the generic repository to Application.Shared library. Is what I've done correct? How to register this module?


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

    Hi,

    What you have did seems correct. You can register your module by depending on it on your web module.

    [DependsOn(typeof(YourMongoDbModule))]
    public class YourWebModule : AbpModule
    {
    
    }
    

    You can also check ABP's experimental mongo db implementation <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/tree/dev/src/Abp.MongoDB">https://github.com/aspnetboilerplate/as ... bp.MongoDB</a>.