public async Task <ViewResult> Index() { ViewBag.Subscriptions = await SubscriptionsFacade.UserActiveSubscriptionsAsync(User.Identity.GetUserId()); ViewBag.PaymentDetails = await SubscriptionsFacade.DefaultCreditCard(User.Identity.GetUserId()); ViewBag.Invoices = await InvoiceDataService.UserInvoicesAsync(User.Identity.GetUserId()); return(View()); }
public async Task <ViewResult> Index() { var userId = User.Identity.GetUserId(); ViewBag.Subscriptions = await SubscriptionsFacade.UserActiveSubscriptionsAsync(User.Identity.GetUserId()); ViewBag.PaymentDetails = await SubscriptionsFacade.DefaultCreditCard(User.Identity.GetUserId()); ViewBag.Invoices = await InvoiceDataService.UserInvoicesAsync(User.Identity.GetUserId()); ViewBag.BillingAddress = (await UserManager.FindByIdAsync(userId)).BillingAddress; return(View()); }