- ABP Framework version: V8.1.0
- UI Type: Blazor WASM
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
- Exception message and full stack trace:
- Steps to reproduce the issue:
Dear All,
We need to use use a current Exsiting Database? how could we do so ? and how to add its DB context?
Thanks, Thanks.
5 Answer(s)
-
0
hi
You can check https://support.abp.io/QA/Questions/2846/Existing-Database
Thanks.
-
0
this is not exactly what we are looking for
the existing database will still be used by other systems so we don't need to change it, we just need to have a DB context and models for it in APB Commercial app so that we can read, insert, update, delete from within ABP
-
0
hi
the existing database will still be used by other systems so we don't need to change it,
You don't need to change the database and tables.
You need to :
- create the entity/aggregate root classes
- add your entity classes to
DbContext
class.DbSet
- configure your entity classes in
OnModelCreating
method ofDbContext
- Inject the repository and test it.
-
0
We need to know how to add another DBcontext to the solution.
also, can we use the ABPSUITE to create the models?
-
0
hi
We need to know how to add another DBcontext to the solution.
You can check this : https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations#create-a-second-dbcontext
also, can we use the ABPSUITE to create the models?
https://docs.abp.io/en/commercial/latest/abp-suite/generating-entities-from-an-existing-database-table