Open Closed

How to make a selection of orders for the user logged in? #257


User avatar
0
wai created
  1. How to make data displayed, for "Order" indicated OrganizationUnits?
  2. How to make sure that the "Orders" are only robbed of the user he logged in to?

  • ABP Framework version: v2.9.0
  • UI type: MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): no

9 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    can you check this https://aspnetboilerplate.com/Pages/Documents/Zero/Organization-Units#common-use-cases it's very similar

  • User Avatar
    0
    wai created

    Yes, this is what you need, but how to organize it in DDD correctly. The organization of the AspNetBoilerplate methods is different. Could you do an example for DDD

  • User Avatar
    0
    alper created
    Support Team Director

    if the aspnetboilerplate implementation doesn't help you, we can write a doc about this usage, but this can be in v3.0 or in v3.1.

  • User Avatar
    0
    wai created

    It was wonderful and not only for me!

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    @wai hello,

    Organization Unit documentation can be found here. Sample project can be found here.

  • User Avatar
    0
    wai created

    Yes, this is a great example. But I had a question how to implement it in Application Layer?

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    hello @wai,

    I would consider adding a method to repository something like GetOrdersOfTheCurrentUsersAsync then calling it on application layer. Sample is here: https://github.com/abpframework/abp-samples/tree/master/OrganizationUnitSample#filter-entities-for-a-user

  • User Avatar
    0
    wai created

    I did the same as in your example. I don't quite understand how to call them on the page?

  • User Avatar
    0
    alper created
    Support Team Director

    hi @wai, as I understand from your question you don't know basics of the application. you can create an application service and call the domain services in this new service. all application services are being exposed as WebAPIs by default. you can check Swagger to see how it can be called via JavaScript. also see https://docs.abp.io/en/abp/latest/Application-Services

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