Is there a way to put attributes for validation and for security in inner layers?
I want to put the security for example in the API layer.
The api layer is just an injected class to the controller.
the controller invoke the API.
api.Join(user);
class UserApi{
//I want the attribute on a class library.
[Authorized(Role....)]
public void Join(User user){}
}
Thanks