public IActionResult Select() { var accessToken = accessTokenRepository.GetAccessTokenModel(); var subscriptions = subscriptionRepository.GetSubscriptionModels(); IList <SelectListItem> selectListItems = new List <SelectListItem>(); var subscriptionViewModel = new SubscriptionViewModel() { SubscriptionId = "", Subscriptions = selectListItems }; if (subscriptions.Count > 0) { foreach (var subscription in subscriptions) { selectListItems.Add(new SelectListItem { Value = subscription.Id, Text = subscription.Name }); } selectListItems[0].Selected = true; subscriptionViewModel.SubscriptionId = subscriptions[0].Id; } return(View(subscriptionViewModel)); }
public IActionResult Select(string resourceGroupName) { var accessToken = accessTokenRepository.GetAccessTokenModel(); return(View()); }