Closed ghost closed 4 years ago
Taking this a step further... if you have ASP Identity managing your user base and you want to associate those users with things like companies and perhaps other entities. Should that all be part of the Asp Tables, or should they be separate and inside the application? If so, how do you map those relationships, as the application can't depend on the infrastructure etc.
I have a model
I saved AccountId as user claim and i can get it in Application Layer
I have a command that the user sends
Before saving I need to verify that the Customer belongs to the user with the specified Account Id.
Question: On what layer is it better to check the ownership of the model?
I have this variants:
What do you think about it. Where we need check ownership of the model?
Thanks!