Exemplo n.º 1
0
        public async Task <IActionResult> CreateAccountType(AdminAccountTypeViewModel model)
        {
            if (ModelState.IsValid)
            {
                await _mediator.Send(new CreateAccountTypeCommand { AccountType = model.NewAccountType });
            }

            return(RedirectToAction("AccountTypes"));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> AccountTypes()
        {
            AdminAccountTypeViewModel model = await _mediator.Send(new GetAdminAccountTypeQuery());

            return(View(model));
        }