Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

MongoDb + ASP.NET boilerplate #4875


User avatar
1
manojreddy created

I am using ASP.Net boilerplate framework + SQL Server 2016 in my project. Recently I have faced a challenge with migration from SQL Server to MongoDB. I have found that it is possible with ASP .NET boilerplate and installed required NuGet packages, however, due to the lack of documentation the only thing I have managed to do is to define respective RepositoryBase class:

public abstract class MyRepositoryBase<TEntity, TPrimaryKey> : MongoDbRepositoryBase<TEntity, TPrimaryKey>
    where TEntity : class, IEntity<TPrimaryKey>
{
    protected MyRepositoryBase(IMongoDatabaseProvider databaseProvider)
        : base(databaseProvider)
    {

    }

}

As far as I understand, first of all, I need to define connection string somewhere now. And then populate the database with required basic data(which previously had been done by EF Core migrations). Obviously, EF Core in the new approach is obsolete so does that mean for my DbContext class that it is obsolete as well? Actually, there are plenty of questions in relation to ASP .NET boilerplate and MongoDB integration, therefore my current post is actually a request for provision of some kind of example of the existing integration. Thank you in advance.


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

    @ManojReddy Thank you for your suggestion. You are right, we must definitely create a sample for ABP + MongoDB.

    We will try to do it in a short time.

  • User Avatar
    0
    mirzanas created

    maybe this sample already exists?

  • User Avatar
    0
    demo.solaru created

    @ismcagdas does this sample for ABP + MongoDB is exists?