Open Closed

SQL View as ABP entity so I can access as repository? #517


User avatar
0
joe@tronactive.com created
  • ABP Framework version: v3.1.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no

I have a view in the DB and a class that I have no problem adding to my DBContext and accessing through a different entity reposittory through the dbsets. But I want to create a repository specifically for this view. But I am unsure the best method for it.

I was thinking just base : Entity with no ID but I have to use a composit keys then and technically I do not have any setup. Any suggestions would be greatly appreciated. Thank you

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    I will check it out.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi

    See https://docs.microsoft.com/en-us/ef/core/modeling/keyless-entity-types?tabs=data-annotations#example. may it will work for you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    joe@tronactive.com created

    Thank you for the suggestion, I can do it that way but I want it to work like a ABP entity and work wth ABPs repository system.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    I made an exmaple for you: https://github.com/realLiangshiwei/Qa517. It integrates seamlessly with ABP.

    See also: https://github.com/abpframework/abp-samples/tree/master/StoredProcedureDemo. ABP provide an example that explaining how to call stored procedures, views and functions

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.