jeudi 3 mai 2018

Is it a good idea to inject the IPrincipal to the Services Layer

I'm working on ASP.NET MVC project where I layered design:

  • Model Layer
  • Data Layer
  • Repositories
  • Services
  • Controllers
  • Views

So I was wondering is it a good idea to inject the HttpContext.Current.User as IPrincipal and use it in my services layer and working with it in there.

Aucun commentaire:

Enregistrer un commentaire