public bool IsTenantExist(string tenancyName)
        {
            var tenant = _repository.AsNoTracking()
                         .FirstOrDefault(x => x.TenancyName == tenancyName && x.Active && !x.IsDeleted);

            if (tenant != null)
            {
                return(true);
            }

            return(false);
        }
        public List <Feature> GetTenantEditionFeatures(string tenantId)
        {
            var tenant = _tenantRepository.AsNoTracking().SingleOrDefault(x => x.Id == tenantId);

            if (tenant == null)
            {
                return(null);
            }

            var features = _repository.AsNoTracking().Where(x =>
                                                            x.EditionId == tenant.EditionId && x.IsEditionFeature && !x.IsTenantFeature && !x.IsFeature).ToList();

            return(features);
        }