MattNorman
Well-known member
- Joined
- May 22, 2021
- Messages
- 98
- Programming Experience
- 1-3
I have recently made the switch to .NET Core and am using the built in DI for my classes.
I currently have a circular dependency and not really sure on the best way to resolve it.
I have the following classes:
LoginControl (ActionFilter) - Used to check that a user has been authenticated
SessionManager - Used to read/write from session
BLErrorLog - Used to read/write error log data
DAErrorLog - Used to read/write error log data
The DAErrorLog class in this case is dependent on the SessionManager class to retrieve user data for logging. This then created a circular dependency and causes the build to fail.
I'm not sure how to resolve this as the DAErrorLog needs to be able to get data from the session.
Does anyone have any suggestions?
I currently have a circular dependency and not really sure on the best way to resolve it.
I have the following classes:
LoginControl (ActionFilter) - Used to check that a user has been authenticated
SessionManager - Used to read/write from session
BLErrorLog - Used to read/write error log data
DAErrorLog - Used to read/write error log data
The DAErrorLog class in this case is dependent on the SessionManager class to retrieve user data for logging. This then created a circular dependency and causes the build to fail.
I'm not sure how to resolve this as the DAErrorLog needs to be able to get data from the session.
Does anyone have any suggestions?