public AccountController()
        {
            var gerenciadorDeContexto = ServiceLocator.Current.GetInstance<IGerenciadorDeContexto>()
                as GerenciadorDeContexto;
            _db = gerenciadorDeContexto.Contexto;

            RoleManager = new RoleManager<RoleIdentity>(
                new RoleStore<RoleIdentity>(_db));

            UserManager = new UserManager<UsuarioIdentity>(
                new UserStore<UsuarioIdentity>(_db));

            UserManager.UserValidator = new ValidacaoUsuario<UsuarioIdentity>(UserManager);

            _gerenciadorDeIdentity = new GerenciadorDeIdentity();
        }
示例#2
0
        public ObjetoController(IObjetoApp objetoApp, IObjetoTagApp tagApp,
            ICursoApp cursoApp, IObjetoAreaApp areaApp, IObjetoTipoApp objetoTipoApp,
            IObjetoCategoriaApp objetoCategoriaApp, IDisciplinaApp disciplinaApp,
            IObjetoArquivoApp objetoArquivoApp)
        {
            _objetoApp = objetoApp;
            _tagApp = tagApp;
            _cursoApp = cursoApp;
            _areaApp = areaApp;
            _objetoTipoApp = objetoTipoApp;
            _objetocategoriaApp = objetoCategoriaApp;
            _disciplinaApp = disciplinaApp;
            _objetoArquivoApp = objetoArquivoApp;

            _autenticacao = new Autenticacao();
            _gerenciadorDeIdentity = new GerenciadorDeIdentity();
        }
示例#3
0
 public RolesController()
 {
     _gerenciadorDeIdentity = new GerenciadorDeIdentity();
 }