public async Task <APIResult> GetAll() { var rs = await accountQueries.GetAllAsync(); return(new APIResult() { Result = 0, Data = rs }); }
public override async Task <IEnumerable <AccountSingleRole> > HandleCommand(GetAllAccountPartnerCommand request, CancellationToken cancellationToken) { var company = await companyQueries.GetByUserIdAsync(request.LoginSession.Id); if (company == null) { throw new BusinessException("Common.NoPermission"); } var lst = (await accountQueries.GetAllAsync(company?.Id)); return(lst); }