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

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

            return(View(model));
        }