An Hexagonal Architecture service template with DDD, CQRS, TDD and SOLID using .NET Core 2.0. All small features are testable and could be mocked. Adapters could be mocked or exchanged.
If the same resource can be accessed by different roles and perhaps differently, where to place that logic. For example, a manager can make any customer account inactive but a customer can only make his/her account inactive. What is better to have a separate for both roles, or a single api /account?customerId=1 and have a if/else inside the controller or domain rule. There can be multiple roles in the real case. What do you prefer?
If the same resource can be accessed by different roles and perhaps differently, where to place that logic. For example, a manager can make any customer account inactive but a customer can only make his/her account inactive. What is better to have a separate for both roles, or a single api /account?customerId=1 and have a if/else inside the controller or domain rule. There can be multiple roles in the real case. What do you prefer?