- ABP Framework version: v8.2
- UI Type: MVC
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): Tiered (for MVC)
- Exception message and full stack trace:
- Steps to reproduce the issue:
I would like to ask about the best practice of this scenario: i have a transaction screen has many lookups bind to dropdowns , which way is better for reusability and maintenance of code , **first **: make App service for each entity of lookup Data ,but i have problem with this solution because i have to inject all services of lookups in transaction screen and this make the screen slower **second **: put all functions of lookups in the app service which is responsible of the transaction screen(this is the way of suite generate page) ,but if i make new transaction screen use this lookups i have to put the same code of get lookups in App service of new transaction screen **third **:make lookup App service and put all functions of lookups in it ,then inject this lookupAppService in transaction screen.
for example : - sales order transaction screen ,has currency lookup and Status Lookup and etc... -Purchase order screen ,has the same lookup dropdown currency lookup and Status Lookup and etc..
4 Answer(s)
-
0
Hi,
For me, I prefer the third one
sales order transaction screen
SalesOrderLookupAppService
urchase order screen
PurchaseOrderLookupAppService
-
0
I want to handle permission of SalesOrderAppService which handle the transaction screen, and if user allow only SalesOrder.Create in permission how i enable second service "SalesOrderLookupAppService" automatically from code.
-
0
Hi,
You can consider to add a new permission named
SalesOrder.Screen
-
0
Thank you ,I appreciate your quick response.