示例#1
0
        public async Task <ActionResult <IEnumerable <ClientReadDto> > > GetAllClientsForATenant(Guid tenantId)
        {
            var tenantFromRepo = await _tenantsRepo.GetTenantById(tenantId);

            if (tenantFromRepo == null)
            {
                return(NotFound());
            }

            var allClientsForTenant = await _clientsRepo.GetAllClientsForTenant(tenantId);

            return(Ok(_mapper.Map <IEnumerable <ClientReadDto> >(allClientsForTenant)));
        }