Starts in:
0 DAY
2 HRS
26 MIN
56 SEC
Starts in:
0 D
2 H
26 M
56 S
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


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

    Hi,

    I will check it out.

  • User Avatar
    0
    liangshiwei created
    Support Team 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.

  • 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.

  • User Avatar
    0
    liangshiwei created
    Support Team 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

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06