Пример #1
0
        public IActionResult CreateAccount()
        {
            var readerAccountBuilder = new AccountDirector(new ReaderAccountBuilder(_db, _roleManager, _userManager));

            readerAccountBuilder.Construct();
            var account = readerAccountBuilder.GetAccount();

            return(RedirectToAction("InformAccount", "Account", new { area = "Customer", id = account.Id }));
        }
        public async Task <IActionResult> CreateLibrarianAccount()
        {
            var librarianAccountBuilder = new AccountDirector(new ManagerAccountBuilder(_db, _roleManager, _userManager));

            librarianAccountBuilder.Construct();
            var account = librarianAccountBuilder.GetAccount();

            return(RedirectToAction("Index", "AdminUser", new { area = "admin", userId = account.Id }));
        }