I'm working on an ASP.NET MVC solution that has two projects, WebUI and DAL. WebUI references DAL. DAL has the repository and context, while WebUI contains Authentication and Authorization classes.
The problem is that I have to send some of the Claim's information to the Entity Framework's
I have several options:
Changing repository's constructor and send the parameter there. This way I have to change around 200 references.
Reference the WebUI project and change the repository to extract required information. This is not possible, since WebUI references DAL and I cannot add circular reference.
Building another project and move the authentication and authorization entirely to that project and reference it in the two other projects. This should be the best option, but is a little painful, specially that authentication and required method depends on the
HttpContextof the current controller.
Any guidance and suggestion is welcome, please let me know if you need any more description.