public async Task <ActionResult> AccountList() { if (Session["Account"] == null || (Session["Account"] as Account).Role != RoleUser.Admin) { return(Redirect("/")); } var accounts = await _account.GetAllAsync(); return(View("~/Areas/Admin/Views/AccountAdmin/AccountList.cshtml", accounts)); }
public async Task <IActionResult> Get() { var result = await _accountService.GetAllAsync(); return(Ok(result)); }
public async Task <IEnumerable <GetAllAccountResponse> > GetAllAsync() { using (_unitOfWorkFactory.StartUnitOfWork()) return(_mapper.Map <List <GetAllAccountResponse> >( await _accountService.GetAllAsync())); }