title: Custom AuthorizeAttribute Ninject Property Injection doesn't work (injected property have sub dependant services which need to be injected)
body: <p>I think the specifics of my question are very much different than the other similar questions which I have red.</p>
  
  <p>I know that when I have custom AuthorizeAttribute I can't inject dependencies with the constructor. This is because the constructor will take the parameters - in my case the permission strings.</p>
  
  <pre><code> [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
      public class UserAllCSPermissionBasedAuthFilter : AuthorizeAttribute
      {
  </code></pre>
  
  <p>I am depending on  authorization service, that's why I am injected that using property injection.</p>
  
  <pre><code>[Inject]
    public IAuthorizationService _authorizationService { get; set; }
  </code></pre>
  
  <p>The problem is that this service depends on another service - userservice which talks directly with repository and dbcontext.
  I have specify for my db context to live in request scope.
  This is cousing an exception - "The operation cannot be completed because the DbContext has been disposed."
  When I looked at the code this is happening when the autorization service calls userservice which asks the dbcontext for some data.
  How should I avoid this happening?</p>
  
  <pre><code>  public class AuthorizationService : IAuthorizationService
      {
          private readonly ICommonRepository _commonRepository;
          private readonly IRepositoryBase&lt;UsersInRolesEntity&gt; _repositoryUsersInRoles;
          private readonly IRepositoryBase&lt;UserCustomerRolesEntity&gt; _repositoryCurstomerRoleEntities;
          private readonly ISqlCustomersRepository _sqlCustomerRepository;
          private readonly IRoleService _roleService;
          private readonly IUserService _userService;
          private readonly IPermissionService _permissionService;
  
          public AuthorizationService(
              IRepositoryBase&lt;UsersInRolesEntity&gt; repositoryUsersInRoles,
              IRepositoryBase&lt;UserCustomerRolesEntity&gt; repositoryCurstomerRoleEntities,
              ICommonRepository commonRepository,
              ISqlCustomersRepository sqlCustomerRepository,
              IRoleService roleService,
              IUserService userService,
              IPermissionService permissionService
              )
          {
  </code></pre>