예제 #1
0
        /// <summary>
        /// This method is hit when not passing any tenant name
        /// Will display the Events Hub page
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            var tenantsModel = _tenantsRepository.GetAllTenants();

            //get the venue name for each tenant
            foreach (var tenant in tenantsModel)
            {
                VenueModel venue = _venuesRepository.GetVenueDetails(_connectionString, tenant.TenantId);
                tenant.VenueName  = venue.VenueName;
                tenant.TenantName = venue.DatabaseName;
            }

            return(View(tenantsModel));
        }
예제 #2
0
 public IEnumerable <Tenant> GetAll()
 {
     return(_repo.GetAllTenants());
 }
예제 #3
0
 public async Task <ActionResult <IEnumerable <TenantReadDto> > > GetAllTenants()
 {
     return(Ok(_mapper.Map <IEnumerable <TenantReadDto> >(await _tenantsRepo.GetAllTenants())));
 }
        public void GetTenants()
        {
            var result = _tenantsRepository.GetAllTenants();

            Assert.IsNotNull(result);
        }