Base solution for your next web application
Open Closed

Converting existing solution into ABP - Best practice #1895


User avatar
0
exlnt created

We have just purchased the license for ASPNETZERO. We have an existing SAAS product/solution that has a traditional tiered architecture. We have entity layer with C# classes. We have data access layer with C# methods that call SP's in our DB. We have separate DB solution where we have created all of our tables and SPs. We have a C# business layer that calls the data access layer. Questions:

  1. What would be the best method to bring these items into the ABP solution?
  2. Can we simply copy over all of our code for data access/business and let it continue to call our existing SPs?

Thanks!


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

    Hi,

    You can use use most of the existing codes but it will require some changes.

    • You can move your Entities to *.Core project. I dont know your entity structure but it's better if you can derive them from ABP's Entity class.
    • You will need to create ApplicationService classes in *.Application project and call your DB related code in there.
    • You can use SP calls but it might require some work to do. It's better to create custom repositories and call SP related code in it. <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Repositories#custom-repositories">http://aspnetboilerplate.com/Pages/Docu ... positories</a>.

    Please let us know if you have any problems during this migration. By the way, you can write to premium forum section.

  • User Avatar
    0
    exlnt created

    I am following your step-by-step guide for the MVC app. However, would it be possible for you to share some more details, with code snippets, on how I can leverage our existing data access (with SPs) and/or business layer? We have a lot of tables with composite keys and FKs to other tables. I'm having trouble recreating all of these as-is using EF code first. This is something we have attempted to do before and have been unable to make it work.

    Thanks! E

  • User Avatar
    0
    ismcagdas created
    Support Team