Base solution for your next web application
Open Closed

Existing MVC applications #4081


User avatar
0
ckreissl created

Hi, all. I would like to "Migrate" an existing MVC Application to ASPNETZero. Could you pls give me an advice how to to that? Or is it possible to extend ASPNETZero with my application?

Thx a lot! Regards, Carsten


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

    Hi @ckreissl,

    AspNet Zero is mainly developed for new projects but it might be possible to migrate existing projects to it. If you have used EF Code First approach, it will be easy to use your entities. IF you used DB First approach, then you can create POCO classes with a custom tool (there are some on the web), then you can create an initial migration on your new project and import your existing data into it.

    You can also use your Controller's and other classes.

    Most tricky part is, User and Role entities and tables. If you have User and Role table in your existing database (probably you have :)), you can map their data into ABP's User adn Role tables.

    There are some other points like multi tenancy. For example is your existing app is multi tenant ? Will your new app be multi tenant ?

    It is hard to explain all steps because we haven't worked on such a migration before. If you want to migrate your app, we can try to help if you have any problems while doing it.

    Thanks.

  • User Avatar
    0
    ckreissl created

    Hi. Thx a lot for your reply. Well, the approach is To integrate an existing Application to aspnetzero. E.g. logging into aspnetzero and a subsite will be the existing one

    Regards Carsten

  • User Avatar
    0
    ckreissl created

    Or in other words, sharing authentication and roles and tenants data

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ckreissl,

    IF the thing you want to do is "sharing authentication and roles and tenants data", you can consider only adding ABP nuget packages to your existing application and use it's login mechanism for authentication.

    You also need to convert your existing contollers to AbpController (you can check AspNet Zero's code for that).