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

Activities of "manojreddy"

It doesn't have support for EF Core.

Any other suggestions?

I have an existing database on SQL server, But I don't have the model classes or the backend C# code(only the database which has tables, SPs, and triggers). I want to build a Web application on top of this already existing database using aspnetzero framework, means I want to use the already existing database also and start my web application using this database. I want to use the existing database tables, SPs, and triggers also.

Is there any way to generate the migration, dbcontext, and snapshot of this already existing database, so that If need to add/modify the existing tables/SPs/Triggers, I can create using the code first approach.

So could you please let me know what could be the best approach to proceed with this kind of requirement?

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.

With this framework being predominantly a Microsoft framework I was wondering if in the future it would be worth while building a template for Razor Web Pages?

Not looked into it too much myself but I would imagine there would be some effort involved to take the current Abp Controller logic into some sort of a Abp Page base class.

Just asking for peoples personal opinion - no right or wrong here :-)

I have some model classes.

public class AClass : FullAuditedEntity<int>
{

}

and one interface like below.

public interface ISomeInterface<T, TEntity> where T : BaseFileEntity where TEntity : class, IEntity<int>
{

}

Now If I add one extra model class like below.

public class BClass : FullAuditedEntity<string>
{

}

I have to define another interface for this change like below.

public interface ISomeInterface<T, TEntity> where T : BaseFileEntity where TEntity : class, IEntity<string>
{

}

So basically it's duplicate code. Is there any better way to do this?

Thanks a lot as always :)

Yes, its not at all related to AspNet Zero. But this is very common problem for a developer who is using AspNet Zero and working on multiple branches concurrently.

@ismcagdas,

Thanks a lot for your response. Could you please let me know that which version will have fix for this?

I'm just wondering how SQLite in test cases know about the SQL Server database?

Any comment on this?

<a class="postlink" href="https://github.com/aspnet/EntityFrameworkCore/issues/11162#issuecomment-370896021">https://github.com/aspnet/EntityFramewo ... -370896021</a>

Showing 31 to 40 of 267 entries