- 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
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
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
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
DbContextclass.DbSet - configure your entity classes in
OnModelCreatingmethod ofDbContext - Inject the repository and test it.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
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
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)