You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, I need to access the User entity to perform a join query. To achieve this, I decided to create a report service and inject ApplicationDbContext directly, instead of using the IApplicationDbContext interface, like this:
My question is: Is this approach acceptable, or am I violating architectural principles? If it's not the right approach, what are the potential side effects?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone,
In some cases, I need to access the
User
entity to perform a join query. To achieve this, I decided to create a report service and injectApplicationDbContext
directly, instead of using theIApplicationDbContext
interface, like this:My question is: Is this approach acceptable, or am I violating architectural principles? If it's not the right approach, what are the potential side effects?
Beta Was this translation helpful? Give feedback.
All reactions