/// <summary> /// Gets all available models for the specified site. /// </summary> /// <param name="siteId">The optional site id</param> /// <returns>The available models</returns> public async Task <IEnumerable <Alias> > GetAllAsync(Guid?siteId = null) { if (!siteId.HasValue) { var site = await _siteService.GetDefaultAsync().ConfigureAwait(false); if (site != null) { siteId = site.Id; } } if (siteId.HasValue) { return(await _repo.GetAll(siteId.Value).ConfigureAwait(false)); } return(null); }